var COMPILED = !0, goog = goog || {};
goog.global = this;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.TRUSTED_SITE = !0;
goog.provide = function(a) {
  if (!COMPILED) {
    if (goog.isProvided_(a)) {
      throw Error('Namespace "' + a + '" already declared.');
    }
    delete goog.implicitNamespaces_[a];
    for (var b = a;(b = b.substring(0, b.lastIndexOf("."))) && !goog.getObjectByName(b);) {
      goog.implicitNamespaces_[b] = !0;
    }
  }
  goog.exportPath_(a);
};
goog.setTestOnly = function(a) {
  if (COMPILED && !goog.DEBUG) {
    throw a = a || "", Error("Importing test-only code into non-debug environment" + a ? ": " + a : ".");
  }
};
COMPILED || (goog.isProvided_ = function(a) {
  return!goog.implicitNamespaces_[a] && !!goog.getObjectByName(a);
}, goog.implicitNamespaces_ = {});
goog.exportPath_ = function(a, b, c) {
  a = a.split(".");
  c = c || goog.global;
  a[0] in c || !c.execScript || c.execScript("var " + a[0]);
  for (var d;a.length && (d = a.shift());) {
    !a.length && goog.isDef(b) ? c[d] = b : c = c[d] ? c[d] : c[d] = {};
  }
};
goog.getObjectByName = function(a, b) {
  for (var c = a.split("."), d = b || goog.global, e;e = c.shift();) {
    if (goog.isDefAndNotNull(d[e])) {
      d = d[e];
    } else {
      return null;
    }
  }
  return d;
};
goog.globalize = function(a, b) {
  var c = b || goog.global, d;
  for (d in a) {
    c[d] = a[d];
  }
};
goog.addDependency = function(a, b, c) {
  if (!COMPILED) {
    var d;
    a = a.replace(/\\/g, "/");
    for (var e = goog.dependencies_, f = 0;d = b[f];f++) {
      e.nameToPath[d] = a, a in e.pathToNames || (e.pathToNames[a] = {}), e.pathToNames[a][d] = !0;
    }
    for (d = 0;b = c[d];d++) {
      a in e.requires || (e.requires[a] = {}), e.requires[a][b] = !0;
    }
  }
};
goog.ENABLE_DEBUG_LOADER = !0;
goog.require = function(a) {
  if (!COMPILED && !goog.isProvided_(a)) {
    if (goog.ENABLE_DEBUG_LOADER) {
      var b = goog.getPathFromDeps_(a);
      if (b) {
        goog.included_[b] = !0;
        goog.writeScripts_();
        return;
      }
    }
    a = "goog.require could not find: " + a;
    goog.global.console && goog.global.console.error(a);
    throw Error(a);
  }
};
goog.basePath = "";
goog.nullFunction = function() {
};
goog.identityFunction = function(a, b) {
  return a;
};
goog.abstractMethod = function() {
  throw Error("unimplemented abstract method");
};
goog.addSingletonGetter = function(a) {
  a.getInstance = function() {
    if (a.instance_) {
      return a.instance_;
    }
    goog.DEBUG && (goog.instantiatedSingletons_[goog.instantiatedSingletons_.length] = a);
    return a.instance_ = new a;
  };
};
goog.instantiatedSingletons_ = [];
!COMPILED && goog.ENABLE_DEBUG_LOADER && (goog.included_ = {}, goog.dependencies_ = {pathToNames:{}, nameToPath:{}, requires:{}, visited:{}, written:{}}, goog.inHtmlDocument_ = function() {
  var a = goog.global.document;
  return "undefined" != typeof a && "write" in a;
}, goog.findBasePath_ = function() {
  if (goog.global.CLOSURE_BASE_PATH) {
    goog.basePath = goog.global.CLOSURE_BASE_PATH;
  } else {
    if (goog.inHtmlDocument_()) {
      for (var a = goog.global.document.getElementsByTagName("script"), b = a.length - 1;0 <= b;--b) {
        var c = a[b].src, d = c.lastIndexOf("?"), d = -1 == d ? c.length : d;
        if ("base.js" == c.substr(d - 7, 7)) {
          goog.basePath = c.substr(0, d - 7);
          break;
        }
      }
    }
  }
}, goog.importScript_ = function(a) {
  var b = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_;
  !goog.dependencies_.written[a] && b(a) && (goog.dependencies_.written[a] = !0);
}, goog.writeScriptTag_ = function(a) {
  if (goog.inHtmlDocument_()) {
    var b = goog.global.document;
    if ("complete" == b.readyState) {
      if (/\bdeps.js$/.test(a)) {
        return!1;
      }
      throw Error('Cannot write "' + a + '" after document load');
    }
    b.write('\x3cscript type\x3d"text/javascript" src\x3d"' + a + '"\x3e\x3c/script\x3e');
    return!0;
  }
  return!1;
}, goog.writeScripts_ = function() {
  function a(e) {
    if (!(e in d.written)) {
      if (!(e in d.visited) && (d.visited[e] = !0, e in d.requires)) {
        for (var g in d.requires[e]) {
          if (!goog.isProvided_(g)) {
            if (g in d.nameToPath) {
              a(d.nameToPath[g]);
            } else {
              throw Error("Undefined nameToPath for " + g);
            }
          }
        }
      }
      e in c || (c[e] = !0, b.push(e));
    }
  }
  var b = [], c = {}, d = goog.dependencies_, e;
  for (e in goog.included_) {
    d.written[e] || a(e);
  }
  for (e = 0;e < b.length;e++) {
    if (b[e]) {
      goog.importScript_(goog.basePath + b[e]);
    } else {
      throw Error("Undefined script input");
    }
  }
}, goog.getPathFromDeps_ = function(a) {
  return a in goog.dependencies_.nameToPath ? goog.dependencies_.nameToPath[a] : null;
}, goog.findBasePath_(), goog.global.CLOSURE_NO_DEPS || goog.importScript_(goog.basePath + "deps.js"));
goog.typeOf = function(a) {
  var b = typeof a;
  if ("object" == b) {
    if (a) {
      if (a instanceof Array) {
        return "array";
      }
      if (a instanceof Object) {
        return b;
      }
      var c = Object.prototype.toString.call(a);
      if ("[object Window]" == c) {
        return "object";
      }
      if ("[object Array]" == c || "number" == typeof a.length && "undefined" != typeof a.splice && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("splice")) {
        return "array";
      }
      if ("[object Function]" == c || "undefined" != typeof a.call && "undefined" != typeof a.propertyIsEnumerable && !a.propertyIsEnumerable("call")) {
        return "function";
      }
    } else {
      return "null";
    }
  } else {
    if ("function" == b && "undefined" == typeof a.call) {
      return "object";
    }
  }
  return b;
};
goog.isDef = function(a) {
  return void 0 !== a;
};
goog.isNull = function(a) {
  return null === a;
};
goog.isDefAndNotNull = function(a) {
  return null != a;
};
goog.isArray = function(a) {
  return "array" == goog.typeOf(a);
};
goog.isArrayLike = function(a) {
  var b = goog.typeOf(a);
  return "array" == b || "object" == b && "number" == typeof a.length;
};
goog.isDateLike = function(a) {
  return goog.isObject(a) && "function" == typeof a.getFullYear;
};
goog.isString = function(a) {
  return "string" == typeof a;
};
goog.isBoolean = function(a) {
  return "boolean" == typeof a;
};
goog.isNumber = function(a) {
  return "number" == typeof a;
};
goog.isFunction = function(a) {
  return "function" == goog.typeOf(a);
};
goog.isObject = function(a) {
  var b = typeof a;
  return "object" == b && null != a || "function" == b;
};
goog.getUid = function(a) {
  return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_);
};
goog.removeUid = function(a) {
  "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
  try {
    delete a[goog.UID_PROPERTY_];
  } catch (b) {
  }
};
goog.UID_PROPERTY_ = "closure_uid_" + (1E9 * Math.random() >>> 0);
goog.uidCounter_ = 0;
goog.getHashCode = goog.getUid;
goog.removeHashCode = goog.removeUid;
goog.cloneObject = function(a) {
  var b = goog.typeOf(a);
  if ("object" == b || "array" == b) {
    if (a.clone) {
      return a.clone();
    }
    var b = "array" == b ? [] : {}, c;
    for (c in a) {
      b[c] = goog.cloneObject(a[c]);
    }
    return b;
  }
  return a;
};
goog.bindNative_ = function(a, b, c) {
  return a.call.apply(a.bind, arguments);
};
goog.bindJs_ = function(a, b, c) {
  if (!a) {
    throw Error();
  }
  if (2 < arguments.length) {
    var d = Array.prototype.slice.call(arguments, 2);
    return function() {
      var c = Array.prototype.slice.call(arguments);
      Array.prototype.unshift.apply(c, d);
      return a.apply(b, c);
    };
  }
  return function() {
    return a.apply(b, arguments);
  };
};
goog.bind = function(a, b, c) {
  Function.prototype.bind && -1 != Function.prototype.bind.toString().indexOf("native code") ? goog.bind = goog.bindNative_ : goog.bind = goog.bindJs_;
  return goog.bind.apply(null, arguments);
};
goog.partial = function(a, b) {
  var c = Array.prototype.slice.call(arguments, 1);
  return function() {
    var b = Array.prototype.slice.call(arguments);
    b.unshift.apply(b, c);
    return a.apply(this, b);
  };
};
goog.mixin = function(a, b) {
  for (var c in b) {
    a[c] = b[c];
  }
};
goog.now = goog.TRUSTED_SITE && Date.now || function() {
  return+new Date;
};
goog.globalEval = function(a) {
  if (goog.global.execScript) {
    goog.global.execScript(a, "JavaScript");
  } else {
    if (goog.global.eval) {
      if (null == goog.evalWorksForGlobals_ && (goog.global.eval("var _et_ \x3d 1;"), "undefined" != typeof goog.global._et_ ? (delete goog.global._et_, goog.evalWorksForGlobals_ = !0) : goog.evalWorksForGlobals_ = !1), goog.evalWorksForGlobals_) {
        goog.global.eval(a);
      } else {
        var b = goog.global.document, c = b.createElement("script");
        c.type = "text/javascript";
        c.defer = !1;
        c.appendChild(b.createTextNode(a));
        b.body.appendChild(c);
        b.body.removeChild(c);
      }
    } else {
      throw Error("goog.globalEval not available");
    }
  }
};
goog.evalWorksForGlobals_ = null;
goog.getCssName = function(a, b) {
  var c = function(a) {
    return goog.cssNameMapping_[a] || a;
  }, d = function(a) {
    a = a.split("-");
    for (var b = [], d = 0;d < a.length;d++) {
      b.push(c(a[d]));
    }
    return b.join("-");
  }, d = goog.cssNameMapping_ ? "BY_WHOLE" == goog.cssNameMappingStyle_ ? c : d : function(a) {
    return a;
  };
  return b ? a + "-" + d(b) : d(a);
};
goog.setCssNameMapping = function(a, b) {
  goog.cssNameMapping_ = a;
  goog.cssNameMappingStyle_ = b;
};
!COMPILED && goog.global.CLOSURE_CSS_NAME_MAPPING && (goog.cssNameMapping_ = goog.global.CLOSURE_CSS_NAME_MAPPING);
goog.getMsg = function(a, b) {
  var c = b || {}, d;
  for (d in c) {
    var e = ("" + c[d]).replace(/\$/g, "$$$$");
    a = a.replace(RegExp("\\{\\$" + d + "\\}", "gi"), e);
  }
  return a;
};
goog.getMsgWithFallback = function(a, b) {
  return a;
};
goog.exportSymbol = function(a, b, c) {
  goog.exportPath_(a, b, c);
};
goog.exportProperty = function(a, b, c) {
  a[b] = c;
};
goog.inherits = function(a, b) {
  function c() {
  }
  c.prototype = b.prototype;
  a.superClass_ = b.prototype;
  a.prototype = new c;
  a.prototype.constructor = a;
};
goog.base = function(a, b, c) {
  var d = arguments.callee.caller;
  if (d.superClass_) {
    return d.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1));
  }
  for (var e = Array.prototype.slice.call(arguments, 2), f = !1, g = a.constructor;g;g = g.superClass_ && g.superClass_.constructor) {
    if (g.prototype[b] === d) {
      f = !0;
    } else {
      if (f) {
        return g.prototype[b].apply(a, e);
      }
    }
  }
  if (a[b] === d) {
    return a.constructor.prototype[b].apply(a, e);
  }
  throw Error("goog.base called from a method of one name to a method of a different name");
};
goog.scope = function(a) {
  a.call(goog.global);
};
goog.string = {};
goog.string.Unicode = {NBSP:"\u00a0"};
goog.string.startsWith = function(a, b) {
  return 0 == a.lastIndexOf(b, 0);
};
goog.string.endsWith = function(a, b) {
  var c = a.length - b.length;
  return 0 <= c && a.indexOf(b, c) == c;
};
goog.string.caseInsensitiveStartsWith = function(a, b) {
  return 0 == goog.string.caseInsensitiveCompare(b, a.substr(0, b.length));
};
goog.string.caseInsensitiveEndsWith = function(a, b) {
  return 0 == goog.string.caseInsensitiveCompare(b, a.substr(a.length - b.length, b.length));
};
goog.string.subs = function(a, b) {
  for (var c = 1;c < arguments.length;c++) {
    var d = String(arguments[c]).replace(/\$/g, "$$$$");
    a = a.replace(/\%s/, d);
  }
  return a;
};
goog.string.collapseWhitespace = function(a) {
  return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "");
};
goog.string.isEmpty = function(a) {
  return/^[\s\xa0]*$/.test(a);
};
goog.string.isEmptySafe = function(a) {
  return goog.string.isEmpty(goog.string.makeSafe(a));
};
goog.string.isBreakingWhitespace = function(a) {
  return!/[^\t\n\r ]/.test(a);
};
goog.string.isAlpha = function(a) {
  return!/[^a-zA-Z]/.test(a);
};
goog.string.isNumeric = function(a) {
  return!/[^0-9]/.test(a);
};
goog.string.isAlphaNumeric = function(a) {
  return!/[^a-zA-Z0-9]/.test(a);
};
goog.string.isSpace = function(a) {
  return " " == a;
};
goog.string.isUnicodeChar = function(a) {
  return 1 == a.length && " " <= a && "~" >= a || "\u0080" <= a && "\ufffd" >= a;
};
goog.string.stripNewlines = function(a) {
  return a.replace(/(\r\n|\r|\n)+/g, " ");
};
goog.string.canonicalizeNewlines = function(a) {
  return a.replace(/(\r\n|\r|\n)/g, "\n");
};
goog.string.normalizeWhitespace = function(a) {
  return a.replace(/\xa0|\s/g, " ");
};
goog.string.normalizeSpaces = function(a) {
  return a.replace(/\xa0|[ \t]+/g, " ");
};
goog.string.collapseBreakingSpaces = function(a) {
  return a.replace(/[\t\r\n ]+/g, " ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g, "");
};
goog.string.trim = function(a) {
  return a.replace(/^[\s\xa0]+|[\s\xa0]+$/g, "");
};
goog.string.trimLeft = function(a) {
  return a.replace(/^[\s\xa0]+/, "");
};
goog.string.trimRight = function(a) {
  return a.replace(/[\s\xa0]+$/, "");
};
goog.string.caseInsensitiveCompare = function(a, b) {
  var c = String(a).toLowerCase(), d = String(b).toLowerCase();
  return c < d ? -1 : c == d ? 0 : 1;
};
goog.string.numerateCompareRegExp_ = /(\.\d+)|(\d+)|(\D+)/g;
goog.string.numerateCompare = function(a, b) {
  if (a == b) {
    return 0;
  }
  if (!a) {
    return-1;
  }
  if (!b) {
    return 1;
  }
  for (var c = a.toLowerCase().match(goog.string.numerateCompareRegExp_), d = b.toLowerCase().match(goog.string.numerateCompareRegExp_), e = Math.min(c.length, d.length), f = 0;f < e;f++) {
    var g = c[f], h = d[f];
    if (g != h) {
      return c = parseInt(g, 10), !isNaN(c) && (d = parseInt(h, 10), !isNaN(d) && c - d) ? c - d : g < h ? -1 : 1;
    }
  }
  return c.length != d.length ? c.length - d.length : a < b ? -1 : 1;
};
goog.string.urlEncode = function(a) {
  return encodeURIComponent(String(a));
};
goog.string.urlDecode = function(a) {
  return decodeURIComponent(a.replace(/\+/g, " "));
};
goog.string.newLineToBr = function(a, b) {
  return a.replace(/(\r\n|\r|\n)/g, b ? "\x3cbr /\x3e" : "\x3cbr\x3e");
};
goog.string.htmlEscape = function(a, b) {
  if (b) {
    return a.replace(goog.string.amperRe_, "\x26amp;").replace(goog.string.ltRe_, "\x26lt;").replace(goog.string.gtRe_, "\x26gt;").replace(goog.string.quotRe_, "\x26quot;");
  }
  if (!goog.string.allRe_.test(a)) {
    return a;
  }
  -1 != a.indexOf("\x26") && (a = a.replace(goog.string.amperRe_, "\x26amp;"));
  -1 != a.indexOf("\x3c") && (a = a.replace(goog.string.ltRe_, "\x26lt;"));
  -1 != a.indexOf("\x3e") && (a = a.replace(goog.string.gtRe_, "\x26gt;"));
  -1 != a.indexOf('"') && (a = a.replace(goog.string.quotRe_, "\x26quot;"));
  return a;
};
goog.string.amperRe_ = /&/g;
goog.string.ltRe_ = /</g;
goog.string.gtRe_ = />/g;
goog.string.quotRe_ = /\"/g;
goog.string.allRe_ = /[&<>\"]/;
goog.string.unescapeEntities = function(a) {
  return goog.string.contains(a, "\x26") ? "document" in goog.global ? goog.string.unescapeEntitiesUsingDom_(a) : goog.string.unescapePureXmlEntities_(a) : a;
};
goog.string.unescapeEntitiesUsingDom_ = function(a) {
  var b = {"\x26amp;":"\x26", "\x26lt;":"\x3c", "\x26gt;":"\x3e", "\x26quot;":'"'}, c = document.createElement("div");
  return a.replace(goog.string.HTML_ENTITY_PATTERN_, function(a, e) {
    var f = b[a];
    if (f) {
      return f;
    }
    if ("#" == e.charAt(0)) {
      var g = Number("0" + e.substr(1));
      isNaN(g) || (f = String.fromCharCode(g));
    }
    f || (c.innerHTML = a + " ", f = c.firstChild.nodeValue.slice(0, -1));
    return b[a] = f;
  });
};
goog.string.unescapePureXmlEntities_ = function(a) {
  return a.replace(/&([^;]+);/g, function(a, c) {
    switch(c) {
      case "amp":
        return "\x26";
      case "lt":
        return "\x3c";
      case "gt":
        return "\x3e";
      case "quot":
        return'"';
      default:
        if ("#" == c.charAt(0)) {
          var d = Number("0" + c.substr(1));
          if (!isNaN(d)) {
            return String.fromCharCode(d);
          }
        }
        return a;
    }
  });
};
goog.string.HTML_ENTITY_PATTERN_ = /&([^;\s<&]+);?/g;
goog.string.whitespaceEscape = function(a, b) {
  return goog.string.newLineToBr(a.replace(/  /g, " \x26#160;"), b);
};
goog.string.stripQuotes = function(a, b) {
  for (var c = b.length, d = 0;d < c;d++) {
    var e = 1 == c ? b : b.charAt(d);
    if (a.charAt(0) == e && a.charAt(a.length - 1) == e) {
      return a.substring(1, a.length - 1);
    }
  }
  return a;
};
goog.string.truncate = function(a, b, c) {
  c && (a = goog.string.unescapeEntities(a));
  a.length > b && (a = a.substring(0, b - 3) + "...");
  c && (a = goog.string.htmlEscape(a));
  return a;
};
goog.string.truncateMiddle = function(a, b, c, d) {
  c && (a = goog.string.unescapeEntities(a));
  if (d && a.length > b) {
    d > b && (d = b);
    var e = a.length - d;
    a = a.substring(0, b - d) + "..." + a.substring(e);
  } else {
    a.length > b && (d = Math.floor(b / 2), e = a.length - d, a = a.substring(0, d + b % 2) + "..." + a.substring(e));
  }
  c && (a = goog.string.htmlEscape(a));
  return a;
};
goog.string.specialEscapeChars_ = {"\x00":"\\0", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\x0B", '"':'\\"', "\\":"\\\\"};
goog.string.jsEscapeCache_ = {"'":"\\'"};
goog.string.quote = function(a) {
  a = String(a);
  if (a.quote) {
    return a.quote();
  }
  for (var b = ['"'], c = 0;c < a.length;c++) {
    var d = a.charAt(c), e = d.charCodeAt(0);
    b[c + 1] = goog.string.specialEscapeChars_[d] || (31 < e && 127 > e ? d : goog.string.escapeChar(d));
  }
  b.push('"');
  return b.join("");
};
goog.string.escapeString = function(a) {
  for (var b = [], c = 0;c < a.length;c++) {
    b[c] = goog.string.escapeChar(a.charAt(c));
  }
  return b.join("");
};
goog.string.escapeChar = function(a) {
  if (a in goog.string.jsEscapeCache_) {
    return goog.string.jsEscapeCache_[a];
  }
  if (a in goog.string.specialEscapeChars_) {
    return goog.string.jsEscapeCache_[a] = goog.string.specialEscapeChars_[a];
  }
  var b = a, c = a.charCodeAt(0);
  if (31 < c && 127 > c) {
    b = a;
  } else {
    if (256 > c) {
      if (b = "\\x", 16 > c || 256 < c) {
        b += "0";
      }
    } else {
      b = "\\u", 4096 > c && (b += "0");
    }
    b += c.toString(16).toUpperCase();
  }
  return goog.string.jsEscapeCache_[a] = b;
};
goog.string.toMap = function(a) {
  for (var b = {}, c = 0;c < a.length;c++) {
    b[a.charAt(c)] = !0;
  }
  return b;
};
goog.string.contains = function(a, b) {
  return-1 != a.indexOf(b);
};
goog.string.countOf = function(a, b) {
  return a && b ? a.split(b).length - 1 : 0;
};
goog.string.removeAt = function(a, b, c) {
  var d = a;
  0 <= b && b < a.length && 0 < c && (d = a.substr(0, b) + a.substr(b + c, a.length - b - c));
  return d;
};
goog.string.remove = function(a, b) {
  var c = RegExp(goog.string.regExpEscape(b), "");
  return a.replace(c, "");
};
goog.string.removeAll = function(a, b) {
  var c = RegExp(goog.string.regExpEscape(b), "g");
  return a.replace(c, "");
};
goog.string.regExpEscape = function(a) {
  return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08");
};
goog.string.repeat = function(a, b) {
  return Array(b + 1).join(a);
};
goog.string.padNumber = function(a, b, c) {
  a = goog.isDef(c) ? a.toFixed(c) : String(a);
  c = a.indexOf(".");
  -1 == c && (c = a.length);
  return goog.string.repeat("0", Math.max(0, b - c)) + a;
};
goog.string.makeSafe = function(a) {
  return null == a ? "" : String(a);
};
goog.string.buildString = function(a) {
  return Array.prototype.join.call(arguments, "");
};
goog.string.getRandomString = function() {
  return Math.floor(2147483648 * Math.random()).toString(36) + Math.abs(Math.floor(2147483648 * Math.random()) ^ goog.now()).toString(36);
};
goog.string.compareVersions = function(a, b) {
  for (var c = 0, d = goog.string.trim(String(a)).split("."), e = goog.string.trim(String(b)).split("."), f = Math.max(d.length, e.length), g = 0;0 == c && g < f;g++) {
    var h = d[g] || "", k = e[g] || "", l = RegExp("(\\d*)(\\D*)", "g"), m = RegExp("(\\d*)(\\D*)", "g");
    do {
      var n = l.exec(h) || ["", "", ""], p = m.exec(k) || ["", "", ""];
      if (0 == n[0].length && 0 == p[0].length) {
        break;
      }
      var c = 0 == n[1].length ? 0 : parseInt(n[1], 10), q = 0 == p[1].length ? 0 : parseInt(p[1], 10), c = goog.string.compareElements_(c, q) || goog.string.compareElements_(0 == n[2].length, 0 == p[2].length) || goog.string.compareElements_(n[2], p[2]);
    } while (0 == c);
  }
  return c;
};
goog.string.compareElements_ = function(a, b) {
  return a < b ? -1 : a > b ? 1 : 0;
};
goog.string.HASHCODE_MAX_ = 4294967296;
goog.string.hashCode = function(a) {
  for (var b = 0, c = 0;c < a.length;++c) {
    b = 31 * b + a.charCodeAt(c), b %= goog.string.HASHCODE_MAX_;
  }
  return b;
};
goog.string.uniqueStringCounter_ = 2147483648 * Math.random() | 0;
goog.string.createUniqueString = function() {
  return "goog_" + goog.string.uniqueStringCounter_++;
};
goog.string.toNumber = function(a) {
  var b = Number(a);
  return 0 == b && goog.string.isEmpty(a) ? NaN : b;
};
goog.string.toCamelCase = function(a) {
  return String(a).replace(/\-([a-z])/g, function(a, c) {
    return c.toUpperCase();
  });
};
goog.string.toSelectorCase = function(a) {
  return String(a).replace(/([A-Z])/g, "-$1").toLowerCase();
};
goog.string.toTitleCase = function(a, b) {
  var c = goog.isString(b) ? goog.string.regExpEscape(b) : "\\s";
  return a.replace(RegExp("(^" + (c ? "|[" + c + "]+" : "") + ")([a-z])", "g"), function(a, b, c) {
    return b + c.toUpperCase();
  });
};
goog.string.parseInt = function(a) {
  isFinite(a) && (a = String(a));
  return goog.isString(a) ? /^\s*-?0x/i.test(a) ? parseInt(a, 16) : parseInt(a, 10) : NaN;
};
goog.debug = {};
goog.debug.Error = function(a) {
  Error.captureStackTrace ? Error.captureStackTrace(this, goog.debug.Error) : this.stack = Error().stack || "";
  a && (this.message = String(a));
};
goog.inherits(goog.debug.Error, Error);
goog.debug.Error.prototype.name = "CustomError";
goog.asserts = {};
goog.asserts.ENABLE_ASSERTS = goog.DEBUG;
goog.asserts.AssertionError = function(a, b) {
  b.unshift(a);
  goog.debug.Error.call(this, goog.string.subs.apply(null, b));
  b.shift();
  this.messagePattern = a;
};
goog.inherits(goog.asserts.AssertionError, goog.debug.Error);
goog.asserts.AssertionError.prototype.name = "AssertionError";
goog.asserts.doAssertFailure_ = function(a, b, c, d) {
  var e = "Assertion failed";
  if (c) {
    var e = e + (": " + c), f = d
  } else {
    a && (e += ": " + a, f = b);
  }
  throw new goog.asserts.AssertionError("" + e, f || []);
};
goog.asserts.assert = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !a && goog.asserts.doAssertFailure_("", null, b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.fail = function(a, b) {
  if (goog.asserts.ENABLE_ASSERTS) {
    throw new goog.asserts.AssertionError("Failure" + (a ? ": " + a : ""), Array.prototype.slice.call(arguments, 1));
  }
};
goog.asserts.assertNumber = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isNumber(a) && goog.asserts.doAssertFailure_("Expected number but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertString = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isString(a) && goog.asserts.doAssertFailure_("Expected string but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertFunction = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isFunction(a) && goog.asserts.doAssertFailure_("Expected function but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertObject = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isObject(a) && goog.asserts.doAssertFailure_("Expected object but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertArray = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isArray(a) && goog.asserts.doAssertFailure_("Expected array but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertBoolean = function(a, b, c) {
  goog.asserts.ENABLE_ASSERTS && !goog.isBoolean(a) && goog.asserts.doAssertFailure_("Expected boolean but got %s: %s.", [goog.typeOf(a), a], b, Array.prototype.slice.call(arguments, 2));
  return a;
};
goog.asserts.assertInstanceof = function(a, b, c, d) {
  !goog.asserts.ENABLE_ASSERTS || a instanceof b || goog.asserts.doAssertFailure_("instanceof check failed.", null, c, Array.prototype.slice.call(arguments, 3));
  return a;
};
goog.array = {};
goog.NATIVE_ARRAY_PROTOTYPES = goog.TRUSTED_SITE;
goog.array.peek = function(a) {
  return a[a.length - 1];
};
goog.array.ARRAY_PROTOTYPE_ = Array.prototype;
goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.indexOf ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.indexOf.call(a, b, c);
} : function(a, b, c) {
  c = null == c ? 0 : 0 > c ? Math.max(0, a.length + c) : c;
  if (goog.isString(a)) {
    return goog.isString(b) && 1 == b.length ? a.indexOf(b, c) : -1;
  }
  for (;c < a.length;c++) {
    if (c in a && a[c] === b) {
      return c;
    }
  }
  return-1;
};
goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.lastIndexOf ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.lastIndexOf.call(a, b, null == c ? a.length - 1 : c);
} : function(a, b, c) {
  c = null == c ? a.length - 1 : c;
  0 > c && (c = Math.max(0, a.length + c));
  if (goog.isString(a)) {
    return goog.isString(b) && 1 == b.length ? a.lastIndexOf(b, c) : -1;
  }
  for (;0 <= c;c--) {
    if (c in a && a[c] === b) {
      return c;
    }
  }
  return-1;
};
goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.forEach ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  goog.array.ARRAY_PROTOTYPE_.forEach.call(a, b, c);
} : function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
    f in e && b.call(c, e[f], f, a);
  }
};
goog.array.forEachRight = function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1;0 <= d;--d) {
    d in e && b.call(c, e[d], d, a);
  }
};
goog.array.filter = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.filter ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.filter.call(a, b, c);
} : function(a, b, c) {
  for (var d = a.length, e = [], f = 0, g = goog.isString(a) ? a.split("") : a, h = 0;h < d;h++) {
    if (h in g) {
      var k = g[h];
      b.call(c, k, h, a) && (e[f++] = k);
    }
  }
  return e;
};
goog.array.map = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.map ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.map.call(a, b, c);
} : function(a, b, c) {
  for (var d = a.length, e = Array(d), f = goog.isString(a) ? a.split("") : a, g = 0;g < d;g++) {
    g in f && (e[g] = b.call(c, f[g], g, a));
  }
  return e;
};
goog.array.reduce = function(a, b, c, d) {
  if (a.reduce) {
    return d ? a.reduce(goog.bind(b, d), c) : a.reduce(b, c);
  }
  var e = c;
  goog.array.forEach(a, function(c, g) {
    e = b.call(d, e, c, g, a);
  });
  return e;
};
goog.array.reduceRight = function(a, b, c, d) {
  if (a.reduceRight) {
    return d ? a.reduceRight(goog.bind(b, d), c) : a.reduceRight(b, c);
  }
  var e = c;
  goog.array.forEachRight(a, function(c, g) {
    e = b.call(d, e, c, g, a);
  });
  return e;
};
goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.some ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.some.call(a, b, c);
} : function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
    if (f in e && b.call(c, e[f], f, a)) {
      return!0;
    }
  }
  return!1;
};
goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && goog.array.ARRAY_PROTOTYPE_.every ? function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.every.call(a, b, c);
} : function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
    if (f in e && !b.call(c, e[f], f, a)) {
      return!1;
    }
  }
  return!0;
};
goog.array.count = function(a, b, c) {
  var d = 0;
  goog.array.forEach(a, function(a, f, g) {
    b.call(c, a, f, g) && ++d;
  }, c);
  return d;
};
goog.array.find = function(a, b, c) {
  b = goog.array.findIndex(a, b, c);
  return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b];
};
goog.array.findIndex = function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
    if (f in e && b.call(c, e[f], f, a)) {
      return f;
    }
  }
  return-1;
};
goog.array.findRight = function(a, b, c) {
  b = goog.array.findIndexRight(a, b, c);
  return 0 > b ? null : goog.isString(a) ? a.charAt(b) : a[b];
};
goog.array.findIndexRight = function(a, b, c) {
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, d = d - 1;0 <= d;d--) {
    if (d in e && b.call(c, e[d], d, a)) {
      return d;
    }
  }
  return-1;
};
goog.array.contains = function(a, b) {
  return 0 <= goog.array.indexOf(a, b);
};
goog.array.isEmpty = function(a) {
  return 0 == a.length;
};
goog.array.clear = function(a) {
  if (!goog.isArray(a)) {
    for (var b = a.length - 1;0 <= b;b--) {
      delete a[b];
    }
  }
  a.length = 0;
};
goog.array.insert = function(a, b) {
  goog.array.contains(a, b) || a.push(b);
};
goog.array.insertAt = function(a, b, c) {
  goog.array.splice(a, c, 0, b);
};
goog.array.insertArrayAt = function(a, b, c) {
  goog.partial(goog.array.splice, a, c, 0).apply(null, b);
};
goog.array.insertBefore = function(a, b, c) {
  var d;
  2 == arguments.length || 0 > (d = goog.array.indexOf(a, c)) ? a.push(b) : goog.array.insertAt(a, b, d);
};
goog.array.remove = function(a, b) {
  var c = goog.array.indexOf(a, b), d;
  (d = 0 <= c) && goog.array.removeAt(a, c);
  return d;
};
goog.array.removeAt = function(a, b) {
  goog.asserts.assert(null != a.length);
  return 1 == goog.array.ARRAY_PROTOTYPE_.splice.call(a, b, 1).length;
};
goog.array.removeIf = function(a, b, c) {
  b = goog.array.findIndex(a, b, c);
  return 0 <= b ? (goog.array.removeAt(a, b), !0) : !1;
};
goog.array.concat = function(a) {
  return goog.array.ARRAY_PROTOTYPE_.concat.apply(goog.array.ARRAY_PROTOTYPE_, arguments);
};
goog.array.toArray = function(a) {
  var b = a.length;
  if (0 < b) {
    for (var c = Array(b), d = 0;d < b;d++) {
      c[d] = a[d];
    }
    return c;
  }
  return[];
};
goog.array.clone = goog.array.toArray;
goog.array.extend = function(a, b) {
  for (var c = 1;c < arguments.length;c++) {
    var d = arguments[c], e;
    if (goog.isArray(d) || (e = goog.isArrayLike(d)) && Object.prototype.hasOwnProperty.call(d, "callee")) {
      a.push.apply(a, d);
    } else {
      if (e) {
        for (var f = a.length, g = d.length, h = 0;h < g;h++) {
          a[f + h] = d[h];
        }
      } else {
        a.push(d);
      }
    }
  }
};
goog.array.splice = function(a, b, c, d) {
  goog.asserts.assert(null != a.length);
  return goog.array.ARRAY_PROTOTYPE_.splice.apply(a, goog.array.slice(arguments, 1));
};
goog.array.slice = function(a, b, c) {
  goog.asserts.assert(null != a.length);
  return 2 >= arguments.length ? goog.array.ARRAY_PROTOTYPE_.slice.call(a, b) : goog.array.ARRAY_PROTOTYPE_.slice.call(a, b, c);
};
goog.array.removeDuplicates = function(a, b) {
  for (var c = b || a, d = {}, e = 0, f = 0;f < a.length;) {
    var g = a[f++], h = goog.isObject(g) ? "o" + goog.getUid(g) : (typeof g).charAt(0) + g;
    Object.prototype.hasOwnProperty.call(d, h) || (d[h] = !0, c[e++] = g);
  }
  c.length = e;
};
goog.array.binarySearch = function(a, b, c) {
  return goog.array.binarySearch_(a, c || goog.array.defaultCompare, !1, b);
};
goog.array.binarySelect = function(a, b, c) {
  return goog.array.binarySearch_(a, b, !0, void 0, c);
};
goog.array.binarySearch_ = function(a, b, c, d, e) {
  for (var f = 0, g = a.length, h;f < g;) {
    var k = f + g >> 1, l;
    l = c ? b.call(e, a[k], k, a) : b(d, a[k]);
    0 < l ? f = k + 1 : (g = k, h = !l);
  }
  return h ? f : ~f;
};
goog.array.sort = function(a, b) {
  goog.asserts.assert(null != a.length);
  goog.array.ARRAY_PROTOTYPE_.sort.call(a, b || goog.array.defaultCompare);
};
goog.array.stableSort = function(a, b) {
  for (var c = 0;c < a.length;c++) {
    a[c] = {index:c, value:a[c]};
  }
  var d = b || goog.array.defaultCompare;
  goog.array.sort(a, function(a, b) {
    return d(a.value, b.value) || a.index - b.index;
  });
  for (c = 0;c < a.length;c++) {
    a[c] = a[c].value;
  }
};
goog.array.sortObjectsByKey = function(a, b, c) {
  var d = c || goog.array.defaultCompare;
  goog.array.sort(a, function(a, c) {
    return d(a[b], c[b]);
  });
};
goog.array.isSorted = function(a, b, c) {
  b = b || goog.array.defaultCompare;
  for (var d = 1;d < a.length;d++) {
    var e = b(a[d - 1], a[d]);
    if (0 < e || 0 == e && c) {
      return!1;
    }
  }
  return!0;
};
goog.array.equals = function(a, b, c) {
  if (!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) {
    return!1;
  }
  var d = a.length;
  c = c || goog.array.defaultCompareEquality;
  for (var e = 0;e < d;e++) {
    if (!c(a[e], b[e])) {
      return!1;
    }
  }
  return!0;
};
goog.array.compare = function(a, b, c) {
  return goog.array.equals(a, b, c);
};
goog.array.compare3 = function(a, b, c) {
  c = c || goog.array.defaultCompare;
  for (var d = Math.min(a.length, b.length), e = 0;e < d;e++) {
    var f = c(a[e], b[e]);
    if (0 != f) {
      return f;
    }
  }
  return goog.array.defaultCompare(a.length, b.length);
};
goog.array.defaultCompare = function(a, b) {
  return a > b ? 1 : a < b ? -1 : 0;
};
goog.array.defaultCompareEquality = function(a, b) {
  return a === b;
};
goog.array.binaryInsert = function(a, b, c) {
  c = goog.array.binarySearch(a, b, c);
  return 0 > c ? (goog.array.insertAt(a, b, -(c + 1)), !0) : !1;
};
goog.array.binaryRemove = function(a, b, c) {
  b = goog.array.binarySearch(a, b, c);
  return 0 <= b ? goog.array.removeAt(a, b) : !1;
};
goog.array.bucket = function(a, b) {
  for (var c = {}, d = 0;d < a.length;d++) {
    var e = a[d], f = b(e, d, a);
    goog.isDef(f) && (c[f] || (c[f] = [])).push(e);
  }
  return c;
};
goog.array.toObject = function(a, b, c) {
  var d = {};
  goog.array.forEach(a, function(e, f) {
    d[b.call(c, e, f, a)] = e;
  });
  return d;
};
goog.array.range = function(a, b, c) {
  var d = [], e = 0, f = a;
  c = c || 1;
  void 0 !== b && (e = a, f = b);
  if (0 > c * (f - e)) {
    return[];
  }
  if (0 < c) {
    for (a = e;a < f;a += c) {
      d.push(a);
    }
  } else {
    for (a = e;a > f;a += c) {
      d.push(a);
    }
  }
  return d;
};
goog.array.repeat = function(a, b) {
  for (var c = [], d = 0;d < b;d++) {
    c[d] = a;
  }
  return c;
};
goog.array.flatten = function(a) {
  for (var b = [], c = 0;c < arguments.length;c++) {
    var d = arguments[c];
    goog.isArray(d) ? b.push.apply(b, goog.array.flatten.apply(null, d)) : b.push(d);
  }
  return b;
};
goog.array.rotate = function(a, b) {
  goog.asserts.assert(null != a.length);
  a.length && (b %= a.length, 0 < b ? goog.array.ARRAY_PROTOTYPE_.unshift.apply(a, a.splice(-b, b)) : 0 > b && goog.array.ARRAY_PROTOTYPE_.push.apply(a, a.splice(0, -b)));
  return a;
};
goog.array.zip = function(a) {
  if (!arguments.length) {
    return[];
  }
  for (var b = [], c = 0;;c++) {
    for (var d = [], e = 0;e < arguments.length;e++) {
      var f = arguments[e];
      if (c >= f.length) {
        return b;
      }
      d.push(f[c]);
    }
    b.push(d);
  }
};
goog.array.shuffle = function(a, b) {
  for (var c = b || Math.random, d = a.length - 1;0 < d;d--) {
    var e = Math.floor(c() * (d + 1)), f = a[d];
    a[d] = a[e];
    a[e] = f;
  }
};
goog.object = {};
goog.object.forEach = function(a, b, c) {
  for (var d in a) {
    b.call(c, a[d], d, a);
  }
};
goog.object.filter = function(a, b, c) {
  var d = {}, e;
  for (e in a) {
    b.call(c, a[e], e, a) && (d[e] = a[e]);
  }
  return d;
};
goog.object.map = function(a, b, c) {
  var d = {}, e;
  for (e in a) {
    d[e] = b.call(c, a[e], e, a);
  }
  return d;
};
goog.object.some = function(a, b, c) {
  for (var d in a) {
    if (b.call(c, a[d], d, a)) {
      return!0;
    }
  }
  return!1;
};
goog.object.every = function(a, b, c) {
  for (var d in a) {
    if (!b.call(c, a[d], d, a)) {
      return!1;
    }
  }
  return!0;
};
goog.object.getCount = function(a) {
  var b = 0, c;
  for (c in a) {
    b++;
  }
  return b;
};
goog.object.getAnyKey = function(a) {
  for (var b in a) {
    return b;
  }
};
goog.object.getAnyValue = function(a) {
  for (var b in a) {
    return a[b];
  }
};
goog.object.contains = function(a, b) {
  return goog.object.containsValue(a, b);
};
goog.object.getValues = function(a) {
  var b = [], c = 0, d;
  for (d in a) {
    b[c++] = a[d];
  }
  return b;
};
goog.object.getKeys = function(a) {
  var b = [], c = 0, d;
  for (d in a) {
    b[c++] = d;
  }
  return b;
};
goog.object.getValueByKeys = function(a, b) {
  for (var c = goog.isArrayLike(b), d = c ? b : arguments, c = c ? 0 : 1;c < d.length && (a = a[d[c]], goog.isDef(a));c++) {
  }
  return a;
};
goog.object.containsKey = function(a, b) {
  return b in a;
};
goog.object.containsValue = function(a, b) {
  for (var c in a) {
    if (a[c] == b) {
      return!0;
    }
  }
  return!1;
};
goog.object.findKey = function(a, b, c) {
  for (var d in a) {
    if (b.call(c, a[d], d, a)) {
      return d;
    }
  }
};
goog.object.findValue = function(a, b, c) {
  return(b = goog.object.findKey(a, b, c)) && a[b];
};
goog.object.isEmpty = function(a) {
  for (var b in a) {
    return!1;
  }
  return!0;
};
goog.object.clear = function(a) {
  for (var b in a) {
    delete a[b];
  }
};
goog.object.remove = function(a, b) {
  var c;
  (c = b in a) && delete a[b];
  return c;
};
goog.object.add = function(a, b, c) {
  if (b in a) {
    throw Error('The object already contains the key "' + b + '"');
  }
  goog.object.set(a, b, c);
};
goog.object.get = function(a, b, c) {
  return b in a ? a[b] : c;
};
goog.object.set = function(a, b, c) {
  a[b] = c;
};
goog.object.setIfUndefined = function(a, b, c) {
  return b in a ? a[b] : a[b] = c;
};
goog.object.clone = function(a) {
  var b = {}, c;
  for (c in a) {
    b[c] = a[c];
  }
  return b;
};
goog.object.unsafeClone = function(a) {
  var b = goog.typeOf(a);
  if ("object" == b || "array" == b) {
    if (a.clone) {
      return a.clone();
    }
    var b = "array" == b ? [] : {}, c;
    for (c in a) {
      b[c] = goog.object.unsafeClone(a[c]);
    }
    return b;
  }
  return a;
};
goog.object.transpose = function(a) {
  var b = {}, c;
  for (c in a) {
    b[a[c]] = c;
  }
  return b;
};
goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");
goog.object.extend = function(a, b) {
  for (var c, d, e = 1;e < arguments.length;e++) {
    d = arguments[e];
    for (c in d) {
      a[c] = d[c];
    }
    for (var f = 0;f < goog.object.PROTOTYPE_FIELDS_.length;f++) {
      c = goog.object.PROTOTYPE_FIELDS_[f], Object.prototype.hasOwnProperty.call(d, c) && (a[c] = d[c]);
    }
  }
};
goog.object.create = function(a) {
  var b = arguments.length;
  if (1 == b && goog.isArray(arguments[0])) {
    return goog.object.create.apply(null, arguments[0]);
  }
  if (b % 2) {
    throw Error("Uneven number of arguments");
  }
  for (var c = {}, d = 0;d < b;d += 2) {
    c[arguments[d]] = arguments[d + 1];
  }
  return c;
};
goog.object.createSet = function(a) {
  var b = arguments.length;
  if (1 == b && goog.isArray(arguments[0])) {
    return goog.object.createSet.apply(null, arguments[0]);
  }
  for (var c = {}, d = 0;d < b;d++) {
    c[arguments[d]] = !0;
  }
  return c;
};
goog.object.createImmutableView = function(a) {
  var b = a;
  Object.isFrozen && !Object.isFrozen(a) && (b = Object.create(a), Object.freeze(b));
  return b;
};
goog.object.isImmutableView = function(a) {
  return!!Object.isFrozen && Object.isFrozen(a);
};
goog.string.StringBuffer = function(a, b) {
  null != a && this.append.apply(this, arguments);
};
goog.string.StringBuffer.prototype.buffer_ = "";
goog.string.StringBuffer.prototype.set = function(a) {
  this.buffer_ = "" + a;
};
goog.string.StringBuffer.prototype.append = function(a, b, c) {
  this.buffer_ += a;
  if (null != b) {
    for (var d = 1;d < arguments.length;d++) {
      this.buffer_ += arguments[d];
    }
  }
  return this;
};
goog.string.StringBuffer.prototype.clear = function() {
  this.buffer_ = "";
};
goog.string.StringBuffer.prototype.getLength = function() {
  return this.buffer_.length;
};
goog.string.StringBuffer.prototype.toString = function() {
  return this.buffer_;
};
var cljs = {core:{}};
cljs.core._STAR_clojurescript_version_STAR_ = "0.0-2138";
cljs.core._STAR_unchecked_if_STAR_ = !1;
cljs.core._STAR_print_fn_STAR_ = function(a) {
  throw Error("No *print-fn* fn set for evaluation environment");
};
cljs.core.set_print_fn_BANG_ = function(a) {
  return cljs.core._STAR_print_fn_STAR_ = a;
};
cljs.core._STAR_flush_on_newline_STAR_ = !0;
cljs.core._STAR_print_newline_STAR_ = !0;
cljs.core._STAR_print_readably_STAR_ = !0;
cljs.core._STAR_print_meta_STAR_ = !1;
cljs.core._STAR_print_dup_STAR_ = !1;
cljs.core._STAR_print_length_STAR_ = null;
cljs.core._STAR_print_level_STAR_ = null;
cljs.core.pr_opts = function() {
  return new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "flush-on-newline", "flush-on-newline", 4338025857), cljs.core._STAR_flush_on_newline_STAR_, new cljs.core.Keyword(null, "readably", "readably", 4441712502), cljs.core._STAR_print_readably_STAR_, new cljs.core.Keyword(null, "meta", "meta", 1017252215), cljs.core._STAR_print_meta_STAR_, new cljs.core.Keyword(null, "dup", "dup", 1014004081), cljs.core._STAR_print_dup_STAR_, new cljs.core.Keyword(null, "print-length", "print-length", 
  3960797560), cljs.core._STAR_print_length_STAR_], null);
};
cljs.core.enable_console_print_BANG_ = function() {
  cljs.core._STAR_print_newline_STAR_ = !1;
  return cljs.core._STAR_print_fn_STAR_ = function() {
    var a = function(a) {
      return console.log.apply(console, cljs.core.into_array.call(null, a));
    }, b = function(b) {
      var d = null;
      0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return a.call(this, d);
    };
    b.cljs$lang$maxFixedArity = 0;
    b.cljs$lang$applyTo = function(b) {
      b = cljs.core.seq(b);
      return a(b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }();
};
cljs.core.truth_ = function(a) {
  return null != a && !1 !== a;
};
cljs.core.not_native = null;
cljs.core.identical_QMARK_ = function(a, b) {
  return a === b;
};
cljs.core.nil_QMARK_ = function(a) {
  return null == a;
};
cljs.core.array_QMARK_ = function(a) {
  return a instanceof Array;
};
cljs.core.number_QMARK_ = function(a) {
  return "number" === typeof a;
};
cljs.core.not = function(a) {
  return cljs.core.truth_(a) ? !1 : !0;
};
cljs.core.object_QMARK_ = function(a) {
  return null != a ? a.constructor === Object : !1;
};
cljs.core.string_QMARK_ = function(a) {
  return goog.isString(a);
};
cljs.core.native_satisfies_QMARK_ = function(a, b) {
  return a[goog.typeOf(null == b ? null : b)] ? !0 : a._ ? !0 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? !1 : null;
};
cljs.core.is_proto_ = function(a) {
  return a.constructor.prototype === a;
};
cljs.core._STAR_main_cli_fn_STAR_ = null;
cljs.core.type = function(a) {
  return null == a ? null : a.constructor;
};
cljs.core.missing_protocol = function(a, b) {
  var c = cljs.core.type.call(null, b), c = cljs.core.truth_(cljs.core.truth_(c) ? c.cljs$lang$type : c) ? c.cljs$lang$ctorStr : goog.typeOf(b);
  return Error(["No protocol method ", a, " defined for type ", c, ": ", b].join(""));
};
cljs.core.type__GT_str = function(a) {
  var b = a.cljs$lang$ctorStr;
  return cljs.core.truth_(b) ? b : "" + cljs.core.str(a);
};
cljs.core.make_array = function() {
  var a = null, b = function(b, d) {
    return a.call(null, d);
  }, a = function(a, d) {
    switch(arguments.length) {
      case 1:
        return Array(a);
      case 2:
        return b.call(this, a, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return Array(a);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  return a;
}();
cljs.core.aclone = function(a) {
  for (var b = a.length, c = Array(b), d = 0;;) {
    if (d < b) {
      c[d] = a[d], d += 1;
    } else {
      break;
    }
  }
  return c;
};
cljs.core.array = function(a) {
  return Array.prototype.slice.call(arguments);
};
cljs.core.aget = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.apply.call(null, a, a.call(null, b, c), d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 2:
        return a[d];
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a[b];
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.aset = function() {
  var a = null, b = function() {
    var b = function(b, c, d, h) {
      return cljs.core.apply.call(null, a, b[c], d, h);
    }, d = function(a, d, g, h) {
      var k = null;
      3 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return b.call(this, a, d, g, k);
    };
    d.cljs$lang$maxFixedArity = 3;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.next(a);
      var h = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, h, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e, f) {
    switch(arguments.length) {
      case 3:
        return a[d] = e;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, e, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$3 = function(a, b, e) {
    return a[b] = e;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.alength = function(a) {
  return a.length;
};
cljs.core.into_array = function() {
  var a = null, b = function(b) {
    return a.call(null, null, b);
  }, c = function(a, b) {
    return cljs.core.reduce.call(null, function(a, b) {
      a.push(b);
      return a;
    }, [], b);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.Fn = function() {
  return{};
}();
cljs.core.IFn = function() {
  return{};
}();
cljs.core._invoke = function() {
  var a = null, b = function(a) {
    if (a ? a.cljs$core$IFn$_invoke$arity$1 : a) {
      return a.cljs$core$IFn$_invoke$arity$1(a);
    }
    var b;
    b = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!b && (b = cljs.core._invoke._, !b)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return b.call(null, a);
  }, c = function(a, b) {
    if (a ? a.cljs$core$IFn$_invoke$arity$2 : a) {
      return a.cljs$core$IFn$_invoke$arity$2(a, b);
    }
    var c;
    c = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!c && (c = cljs.core._invoke._, !c)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return c.call(null, a, b);
  }, d = function(a, b, c) {
    if (a ? a.cljs$core$IFn$_invoke$arity$3 : a) {
      return a.cljs$core$IFn$_invoke$arity$3(a, b, c);
    }
    var d;
    d = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!d && (d = cljs.core._invoke._, !d)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return d.call(null, a, b, c);
  }, e = function(a, b, c, d) {
    if (a ? a.cljs$core$IFn$_invoke$arity$4 : a) {
      return a.cljs$core$IFn$_invoke$arity$4(a, b, c, d);
    }
    var e;
    e = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!e && (e = cljs.core._invoke._, !e)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return e.call(null, a, b, c, d);
  }, f = function(a, b, c, d, e) {
    if (a ? a.cljs$core$IFn$_invoke$arity$5 : a) {
      return a.cljs$core$IFn$_invoke$arity$5(a, b, c, d, e);
    }
    var f;
    f = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!f && (f = cljs.core._invoke._, !f)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return f.call(null, a, b, c, d, e);
  }, g = function(a, b, c, d, e, f) {
    if (a ? a.cljs$core$IFn$_invoke$arity$6 : a) {
      return a.cljs$core$IFn$_invoke$arity$6(a, b, c, d, e, f);
    }
    var g;
    g = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!g && (g = cljs.core._invoke._, !g)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return g.call(null, a, b, c, d, e, f);
  }, h = function(a, b, c, d, e, f, g) {
    if (a ? a.cljs$core$IFn$_invoke$arity$7 : a) {
      return a.cljs$core$IFn$_invoke$arity$7(a, b, c, d, e, f, g);
    }
    var h;
    h = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!h && (h = cljs.core._invoke._, !h)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return h.call(null, a, b, c, d, e, f, g);
  }, k = function(a, b, c, d, e, f, g, h) {
    if (a ? a.cljs$core$IFn$_invoke$arity$8 : a) {
      return a.cljs$core$IFn$_invoke$arity$8(a, b, c, d, e, f, g, h);
    }
    var k;
    k = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!k && (k = cljs.core._invoke._, !k)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return k.call(null, a, b, c, d, e, f, g, h);
  }, l = function(a, b, c, d, e, f, g, h, k) {
    if (a ? a.cljs$core$IFn$_invoke$arity$9 : a) {
      return a.cljs$core$IFn$_invoke$arity$9(a, b, c, d, e, f, g, h, k);
    }
    var l;
    l = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!l && (l = cljs.core._invoke._, !l)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return l.call(null, a, b, c, d, e, f, g, h, k);
  }, m = function(a, b, c, d, e, f, g, h, k, l) {
    if (a ? a.cljs$core$IFn$_invoke$arity$10 : a) {
      return a.cljs$core$IFn$_invoke$arity$10(a, b, c, d, e, f, g, h, k, l);
    }
    var m;
    m = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!m && (m = cljs.core._invoke._, !m)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return m.call(null, a, b, c, d, e, f, g, h, k, l);
  }, n = function(a, b, c, d, e, f, g, h, k, l, m) {
    if (a ? a.cljs$core$IFn$_invoke$arity$11 : a) {
      return a.cljs$core$IFn$_invoke$arity$11(a, b, c, d, e, f, g, h, k, l, m);
    }
    var n;
    n = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!n && (n = cljs.core._invoke._, !n)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return n.call(null, a, b, c, d, e, f, g, h, k, l, m);
  }, p = function(a, b, c, d, e, f, g, h, k, l, m, n) {
    if (a ? a.cljs$core$IFn$_invoke$arity$12 : a) {
      return a.cljs$core$IFn$_invoke$arity$12(a, b, c, d, e, f, g, h, k, l, m, n);
    }
    var p;
    p = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!p && (p = cljs.core._invoke._, !p)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return p.call(null, a, b, c, d, e, f, g, h, k, l, m, n);
  }, q = function(a, b, c, d, e, f, g, h, k, l, m, n, p) {
    if (a ? a.cljs$core$IFn$_invoke$arity$13 : a) {
      return a.cljs$core$IFn$_invoke$arity$13(a, b, c, d, e, f, g, h, k, l, m, n, p);
    }
    var r;
    r = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!r && (r = cljs.core._invoke._, !r)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return r.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p);
  }, r = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r) {
    if (a ? a.cljs$core$IFn$_invoke$arity$14 : a) {
      return a.cljs$core$IFn$_invoke$arity$14(a, b, c, d, e, f, g, h, k, l, m, n, p, r);
    }
    var q;
    q = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!q && (q = cljs.core._invoke._, !q)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return q.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r);
  }, s = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q) {
    if (a ? a.cljs$core$IFn$_invoke$arity$15 : a) {
      return a.cljs$core$IFn$_invoke$arity$15(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q);
    }
    var s;
    s = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!s && (s = cljs.core._invoke._, !s)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return s.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q);
  }, t = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s) {
    if (a ? a.cljs$core$IFn$_invoke$arity$16 : a) {
      return a.cljs$core$IFn$_invoke$arity$16(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s);
    }
    var t;
    t = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!t && (t = cljs.core._invoke._, !t)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return t.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s);
  }, v = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t) {
    if (a ? a.cljs$core$IFn$_invoke$arity$17 : a) {
      return a.cljs$core$IFn$_invoke$arity$17(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t);
    }
    var u;
    u = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!u && (u = cljs.core._invoke._, !u)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return u.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t);
  }, u = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u) {
    if (a ? a.cljs$core$IFn$_invoke$arity$18 : a) {
      return a.cljs$core$IFn$_invoke$arity$18(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u);
    }
    var v;
    v = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!v && (v = cljs.core._invoke._, !v)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return v.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u);
  }, w = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v) {
    if (a ? a.cljs$core$IFn$_invoke$arity$19 : a) {
      return a.cljs$core$IFn$_invoke$arity$19(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v);
    }
    var w;
    w = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!w && (w = cljs.core._invoke._, !w)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return w.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v);
  }, A = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w) {
    if (a ? a.cljs$core$IFn$_invoke$arity$20 : a) {
      return a.cljs$core$IFn$_invoke$arity$20(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w);
    }
    var A;
    A = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!A && (A = cljs.core._invoke._, !A)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return A.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w);
  }, J = function(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w, A) {
    if (a ? a.cljs$core$IFn$_invoke$arity$21 : a) {
      return a.cljs$core$IFn$_invoke$arity$21(a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w, A);
    }
    var J;
    J = cljs.core._invoke[goog.typeOf(null == a ? null : a)];
    if (!J && (J = cljs.core._invoke._, !J)) {
      throw cljs.core.missing_protocol.call(null, "IFn.-invoke", a);
    }
    return J.call(null, a, b, c, d, e, f, g, h, k, l, m, n, p, r, q, s, t, u, v, w, A);
  }, a = function(a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P, O, Q, Z, $) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, x);
      case 3:
        return d.call(this, a, x, y);
      case 4:
        return e.call(this, a, x, y, B);
      case 5:
        return f.call(this, a, x, y, B, C);
      case 6:
        return g.call(this, a, x, y, B, C, D);
      case 7:
        return h.call(this, a, x, y, B, C, D, z);
      case 8:
        return k.call(this, a, x, y, B, C, D, z, F);
      case 9:
        return l.call(this, a, x, y, B, C, D, z, F, E);
      case 10:
        return m.call(this, a, x, y, B, C, D, z, F, E, G);
      case 11:
        return n.call(this, a, x, y, B, C, D, z, F, E, G, H);
      case 12:
        return p.call(this, a, x, y, B, C, D, z, F, E, G, H, I);
      case 13:
        return q.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K);
      case 14:
        return r.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M);
      case 15:
        return s.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L);
      case 16:
        return t.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N);
      case 17:
        return v.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P);
      case 18:
        return u.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P, O);
      case 19:
        return w.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P, O, Q);
      case 20:
        return A.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P, O, Q, Z);
      case 21:
        return J.call(this, a, x, y, B, C, D, z, F, E, G, H, I, K, M, L, N, P, O, Q, Z, $);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$4 = e;
  a.cljs$core$IFn$_invoke$arity$5 = f;
  a.cljs$core$IFn$_invoke$arity$6 = g;
  a.cljs$core$IFn$_invoke$arity$7 = h;
  a.cljs$core$IFn$_invoke$arity$8 = k;
  a.cljs$core$IFn$_invoke$arity$9 = l;
  a.cljs$core$IFn$_invoke$arity$10 = m;
  a.cljs$core$IFn$_invoke$arity$11 = n;
  a.cljs$core$IFn$_invoke$arity$12 = p;
  a.cljs$core$IFn$_invoke$arity$13 = q;
  a.cljs$core$IFn$_invoke$arity$14 = r;
  a.cljs$core$IFn$_invoke$arity$15 = s;
  a.cljs$core$IFn$_invoke$arity$16 = t;
  a.cljs$core$IFn$_invoke$arity$17 = v;
  a.cljs$core$IFn$_invoke$arity$18 = u;
  a.cljs$core$IFn$_invoke$arity$19 = w;
  a.cljs$core$IFn$_invoke$arity$20 = A;
  a.cljs$core$IFn$_invoke$arity$21 = J;
  return a;
}();
cljs.core.ICloneable = function() {
  return{};
}();
cljs.core._clone = function(a) {
  if (a ? a.cljs$core$ICloneable$_clone$arity$1 : a) {
    return a.cljs$core$ICloneable$_clone$arity$1(a);
  }
  var b;
  b = cljs.core._clone[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._clone._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ICloneable.-clone", a);
  }
  return b.call(null, a);
};
cljs.core.ICounted = function() {
  return{};
}();
cljs.core._count = function(a) {
  if (a ? a.cljs$core$ICounted$_count$arity$1 : a) {
    return a.cljs$core$ICounted$_count$arity$1(a);
  }
  var b;
  b = cljs.core._count[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._count._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ICounted.-count", a);
  }
  return b.call(null, a);
};
cljs.core.IEmptyableCollection = function() {
  return{};
}();
cljs.core._empty = function(a) {
  if (a ? a.cljs$core$IEmptyableCollection$_empty$arity$1 : a) {
    return a.cljs$core$IEmptyableCollection$_empty$arity$1(a);
  }
  var b;
  b = cljs.core._empty[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._empty._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IEmptyableCollection.-empty", a);
  }
  return b.call(null, a);
};
cljs.core.ICollection = function() {
  return{};
}();
cljs.core._conj = function(a, b) {
  if (a ? a.cljs$core$ICollection$_conj$arity$2 : a) {
    return a.cljs$core$ICollection$_conj$arity$2(a, b);
  }
  var c;
  c = cljs.core._conj[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._conj._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ICollection.-conj", a);
  }
  return c.call(null, a, b);
};
cljs.core.IIndexed = function() {
  return{};
}();
cljs.core._nth = function() {
  var a = null, b = function(a, b) {
    if (a ? a.cljs$core$IIndexed$_nth$arity$2 : a) {
      return a.cljs$core$IIndexed$_nth$arity$2(a, b);
    }
    var c;
    c = cljs.core._nth[goog.typeOf(null == a ? null : a)];
    if (!c && (c = cljs.core._nth._, !c)) {
      throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", a);
    }
    return c.call(null, a, b);
  }, c = function(a, b, c) {
    if (a ? a.cljs$core$IIndexed$_nth$arity$3 : a) {
      return a.cljs$core$IIndexed$_nth$arity$3(a, b, c);
    }
    var g;
    g = cljs.core._nth[goog.typeOf(null == a ? null : a)];
    if (!g && (g = cljs.core._nth._, !g)) {
      throw cljs.core.missing_protocol.call(null, "IIndexed.-nth", a);
    }
    return g.call(null, a, b, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.ASeq = function() {
  return{};
}();
cljs.core.ISeq = function() {
  return{};
}();
cljs.core._first = function(a) {
  if (a ? a.cljs$core$ISeq$_first$arity$1 : a) {
    return a.cljs$core$ISeq$_first$arity$1(a);
  }
  var b;
  b = cljs.core._first[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._first._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ISeq.-first", a);
  }
  return b.call(null, a);
};
cljs.core._rest = function(a) {
  if (a ? a.cljs$core$ISeq$_rest$arity$1 : a) {
    return a.cljs$core$ISeq$_rest$arity$1(a);
  }
  var b;
  b = cljs.core._rest[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._rest._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ISeq.-rest", a);
  }
  return b.call(null, a);
};
cljs.core.INext = function() {
  return{};
}();
cljs.core._next = function(a) {
  if (a ? a.cljs$core$INext$_next$arity$1 : a) {
    return a.cljs$core$INext$_next$arity$1(a);
  }
  var b;
  b = cljs.core._next[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._next._, !b)) {
    throw cljs.core.missing_protocol.call(null, "INext.-next", a);
  }
  return b.call(null, a);
};
cljs.core.ILookup = function() {
  return{};
}();
cljs.core._lookup = function() {
  var a = null, b = function(a, b) {
    if (a ? a.cljs$core$ILookup$_lookup$arity$2 : a) {
      return a.cljs$core$ILookup$_lookup$arity$2(a, b);
    }
    var c;
    c = cljs.core._lookup[goog.typeOf(null == a ? null : a)];
    if (!c && (c = cljs.core._lookup._, !c)) {
      throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", a);
    }
    return c.call(null, a, b);
  }, c = function(a, b, c) {
    if (a ? a.cljs$core$ILookup$_lookup$arity$3 : a) {
      return a.cljs$core$ILookup$_lookup$arity$3(a, b, c);
    }
    var g;
    g = cljs.core._lookup[goog.typeOf(null == a ? null : a)];
    if (!g && (g = cljs.core._lookup._, !g)) {
      throw cljs.core.missing_protocol.call(null, "ILookup.-lookup", a);
    }
    return g.call(null, a, b, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.IAssociative = function() {
  return{};
}();
cljs.core._contains_key_QMARK_ = function(a, b) {
  if (a ? a.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 : a) {
    return a.cljs$core$IAssociative$_contains_key_QMARK_$arity$2(a, b);
  }
  var c;
  c = cljs.core._contains_key_QMARK_[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._contains_key_QMARK_._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IAssociative.-contains-key?", a);
  }
  return c.call(null, a, b);
};
cljs.core._assoc = function(a, b, c) {
  if (a ? a.cljs$core$IAssociative$_assoc$arity$3 : a) {
    return a.cljs$core$IAssociative$_assoc$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._assoc[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._assoc._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IAssociative.-assoc", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.IMap = function() {
  return{};
}();
cljs.core._dissoc = function(a, b) {
  if (a ? a.cljs$core$IMap$_dissoc$arity$2 : a) {
    return a.cljs$core$IMap$_dissoc$arity$2(a, b);
  }
  var c;
  c = cljs.core._dissoc[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._dissoc._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IMap.-dissoc", a);
  }
  return c.call(null, a, b);
};
cljs.core.IMapEntry = function() {
  return{};
}();
cljs.core._key = function(a) {
  if (a ? a.cljs$core$IMapEntry$_key$arity$1 : a) {
    return a.cljs$core$IMapEntry$_key$arity$1(a);
  }
  var b;
  b = cljs.core._key[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._key._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMapEntry.-key", a);
  }
  return b.call(null, a);
};
cljs.core._val = function(a) {
  if (a ? a.cljs$core$IMapEntry$_val$arity$1 : a) {
    return a.cljs$core$IMapEntry$_val$arity$1(a);
  }
  var b;
  b = cljs.core._val[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._val._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMapEntry.-val", a);
  }
  return b.call(null, a);
};
cljs.core.ISet = function() {
  return{};
}();
cljs.core._disjoin = function(a, b) {
  if (a ? a.cljs$core$ISet$_disjoin$arity$2 : a) {
    return a.cljs$core$ISet$_disjoin$arity$2(a, b);
  }
  var c;
  c = cljs.core._disjoin[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._disjoin._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ISet.-disjoin", a);
  }
  return c.call(null, a, b);
};
cljs.core.IStack = function() {
  return{};
}();
cljs.core._peek = function(a) {
  if (a ? a.cljs$core$IStack$_peek$arity$1 : a) {
    return a.cljs$core$IStack$_peek$arity$1(a);
  }
  var b;
  b = cljs.core._peek[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._peek._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IStack.-peek", a);
  }
  return b.call(null, a);
};
cljs.core._pop = function(a) {
  if (a ? a.cljs$core$IStack$_pop$arity$1 : a) {
    return a.cljs$core$IStack$_pop$arity$1(a);
  }
  var b;
  b = cljs.core._pop[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._pop._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IStack.-pop", a);
  }
  return b.call(null, a);
};
cljs.core.IVector = function() {
  return{};
}();
cljs.core._assoc_n = function(a, b, c) {
  if (a ? a.cljs$core$IVector$_assoc_n$arity$3 : a) {
    return a.cljs$core$IVector$_assoc_n$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._assoc_n[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._assoc_n._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IVector.-assoc-n", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.IDeref = function() {
  return{};
}();
cljs.core._deref = function(a) {
  if (a ? a.cljs$core$IDeref$_deref$arity$1 : a) {
    return a.cljs$core$IDeref$_deref$arity$1(a);
  }
  var b;
  b = cljs.core._deref[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._deref._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IDeref.-deref", a);
  }
  return b.call(null, a);
};
cljs.core.IDerefWithTimeout = function() {
  return{};
}();
cljs.core._deref_with_timeout = function(a, b, c) {
  if (a ? a.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3 : a) {
    return a.cljs$core$IDerefWithTimeout$_deref_with_timeout$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._deref_with_timeout[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._deref_with_timeout._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IDerefWithTimeout.-deref-with-timeout", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.IMeta = function() {
  return{};
}();
cljs.core._meta = function(a) {
  if (a ? a.cljs$core$IMeta$_meta$arity$1 : a) {
    return a.cljs$core$IMeta$_meta$arity$1(a);
  }
  var b;
  b = cljs.core._meta[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._meta._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMeta.-meta", a);
  }
  return b.call(null, a);
};
cljs.core.IWithMeta = function() {
  return{};
}();
cljs.core._with_meta = function(a, b) {
  if (a ? a.cljs$core$IWithMeta$_with_meta$arity$2 : a) {
    return a.cljs$core$IWithMeta$_with_meta$arity$2(a, b);
  }
  var c;
  c = cljs.core._with_meta[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._with_meta._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IWithMeta.-with-meta", a);
  }
  return c.call(null, a, b);
};
cljs.core.IReduce = function() {
  return{};
}();
cljs.core._reduce = function() {
  var a = null, b = function(a, b) {
    if (a ? a.cljs$core$IReduce$_reduce$arity$2 : a) {
      return a.cljs$core$IReduce$_reduce$arity$2(a, b);
    }
    var c;
    c = cljs.core._reduce[goog.typeOf(null == a ? null : a)];
    if (!c && (c = cljs.core._reduce._, !c)) {
      throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", a);
    }
    return c.call(null, a, b);
  }, c = function(a, b, c) {
    if (a ? a.cljs$core$IReduce$_reduce$arity$3 : a) {
      return a.cljs$core$IReduce$_reduce$arity$3(a, b, c);
    }
    var g;
    g = cljs.core._reduce[goog.typeOf(null == a ? null : a)];
    if (!g && (g = cljs.core._reduce._, !g)) {
      throw cljs.core.missing_protocol.call(null, "IReduce.-reduce", a);
    }
    return g.call(null, a, b, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.IKVReduce = function() {
  return{};
}();
cljs.core._kv_reduce = function(a, b, c) {
  if (a ? a.cljs$core$IKVReduce$_kv_reduce$arity$3 : a) {
    return a.cljs$core$IKVReduce$_kv_reduce$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._kv_reduce[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._kv_reduce._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IKVReduce.-kv-reduce", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.IEquiv = function() {
  return{};
}();
cljs.core._equiv = function(a, b) {
  if (a ? a.cljs$core$IEquiv$_equiv$arity$2 : a) {
    return a.cljs$core$IEquiv$_equiv$arity$2(a, b);
  }
  var c;
  c = cljs.core._equiv[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._equiv._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IEquiv.-equiv", a);
  }
  return c.call(null, a, b);
};
cljs.core.IHash = function() {
  return{};
}();
cljs.core._hash = function(a) {
  if (a ? a.cljs$core$IHash$_hash$arity$1 : a) {
    return a.cljs$core$IHash$_hash$arity$1(a);
  }
  var b;
  b = cljs.core._hash[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._hash._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IHash.-hash", a);
  }
  return b.call(null, a);
};
cljs.core.ISeqable = function() {
  return{};
}();
cljs.core._seq = function(a) {
  if (a ? a.cljs$core$ISeqable$_seq$arity$1 : a) {
    return a.cljs$core$ISeqable$_seq$arity$1(a);
  }
  var b;
  b = cljs.core._seq[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._seq._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ISeqable.-seq", a);
  }
  return b.call(null, a);
};
cljs.core.ISequential = function() {
  return{};
}();
cljs.core.IList = function() {
  return{};
}();
cljs.core.IRecord = function() {
  return{};
}();
cljs.core.IReversible = function() {
  return{};
}();
cljs.core._rseq = function(a) {
  if (a ? a.cljs$core$IReversible$_rseq$arity$1 : a) {
    return a.cljs$core$IReversible$_rseq$arity$1(a);
  }
  var b;
  b = cljs.core._rseq[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._rseq._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IReversible.-rseq", a);
  }
  return b.call(null, a);
};
cljs.core.ISorted = function() {
  return{};
}();
cljs.core._sorted_seq = function(a, b) {
  if (a ? a.cljs$core$ISorted$_sorted_seq$arity$2 : a) {
    return a.cljs$core$ISorted$_sorted_seq$arity$2(a, b);
  }
  var c;
  c = cljs.core._sorted_seq[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._sorted_seq._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq", a);
  }
  return c.call(null, a, b);
};
cljs.core._sorted_seq_from = function(a, b, c) {
  if (a ? a.cljs$core$ISorted$_sorted_seq_from$arity$3 : a) {
    return a.cljs$core$ISorted$_sorted_seq_from$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._sorted_seq_from[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._sorted_seq_from._, !d)) {
    throw cljs.core.missing_protocol.call(null, "ISorted.-sorted-seq-from", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._entry_key = function(a, b) {
  if (a ? a.cljs$core$ISorted$_entry_key$arity$2 : a) {
    return a.cljs$core$ISorted$_entry_key$arity$2(a, b);
  }
  var c;
  c = cljs.core._entry_key[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._entry_key._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ISorted.-entry-key", a);
  }
  return c.call(null, a, b);
};
cljs.core._comparator = function(a) {
  if (a ? a.cljs$core$ISorted$_comparator$arity$1 : a) {
    return a.cljs$core$ISorted$_comparator$arity$1(a);
  }
  var b;
  b = cljs.core._comparator[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._comparator._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ISorted.-comparator", a);
  }
  return b.call(null, a);
};
cljs.core.IWriter = function() {
  return{};
}();
cljs.core._write = function(a, b) {
  if (a ? a.cljs$core$IWriter$_write$arity$2 : a) {
    return a.cljs$core$IWriter$_write$arity$2(a, b);
  }
  var c;
  c = cljs.core._write[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._write._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IWriter.-write", a);
  }
  return c.call(null, a, b);
};
cljs.core._flush = function(a) {
  if (a ? a.cljs$core$IWriter$_flush$arity$1 : a) {
    return a.cljs$core$IWriter$_flush$arity$1(a);
  }
  var b;
  b = cljs.core._flush[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._flush._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IWriter.-flush", a);
  }
  return b.call(null, a);
};
cljs.core.IPrintWithWriter = function() {
  return{};
}();
cljs.core._pr_writer = function(a, b, c) {
  if (a ? a.cljs$core$IPrintWithWriter$_pr_writer$arity$3 : a) {
    return a.cljs$core$IPrintWithWriter$_pr_writer$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._pr_writer[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._pr_writer._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IPrintWithWriter.-pr-writer", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.IPending = function() {
  return{};
}();
cljs.core._realized_QMARK_ = function(a) {
  if (a ? a.cljs$core$IPending$_realized_QMARK_$arity$1 : a) {
    return a.cljs$core$IPending$_realized_QMARK_$arity$1(a);
  }
  var b;
  b = cljs.core._realized_QMARK_[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._realized_QMARK_._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IPending.-realized?", a);
  }
  return b.call(null, a);
};
cljs.core.IWatchable = function() {
  return{};
}();
cljs.core._notify_watches = function(a, b, c) {
  if (a ? a.cljs$core$IWatchable$_notify_watches$arity$3 : a) {
    return a.cljs$core$IWatchable$_notify_watches$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._notify_watches[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._notify_watches._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IWatchable.-notify-watches", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._add_watch = function(a, b, c) {
  if (a ? a.cljs$core$IWatchable$_add_watch$arity$3 : a) {
    return a.cljs$core$IWatchable$_add_watch$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._add_watch[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._add_watch._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IWatchable.-add-watch", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._remove_watch = function(a, b) {
  if (a ? a.cljs$core$IWatchable$_remove_watch$arity$2 : a) {
    return a.cljs$core$IWatchable$_remove_watch$arity$2(a, b);
  }
  var c;
  c = cljs.core._remove_watch[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._remove_watch._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IWatchable.-remove-watch", a);
  }
  return c.call(null, a, b);
};
cljs.core.IEditableCollection = function() {
  return{};
}();
cljs.core._as_transient = function(a) {
  if (a ? a.cljs$core$IEditableCollection$_as_transient$arity$1 : a) {
    return a.cljs$core$IEditableCollection$_as_transient$arity$1(a);
  }
  var b;
  b = cljs.core._as_transient[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._as_transient._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IEditableCollection.-as-transient", a);
  }
  return b.call(null, a);
};
cljs.core.ITransientCollection = function() {
  return{};
}();
cljs.core._conj_BANG_ = function(a, b) {
  if (a ? a.cljs$core$ITransientCollection$_conj_BANG_$arity$2 : a) {
    return a.cljs$core$ITransientCollection$_conj_BANG_$arity$2(a, b);
  }
  var c;
  c = cljs.core._conj_BANG_[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._conj_BANG_._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ITransientCollection.-conj!", a);
  }
  return c.call(null, a, b);
};
cljs.core._persistent_BANG_ = function(a) {
  if (a ? a.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 : a) {
    return a.cljs$core$ITransientCollection$_persistent_BANG_$arity$1(a);
  }
  var b;
  b = cljs.core._persistent_BANG_[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._persistent_BANG_._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ITransientCollection.-persistent!", a);
  }
  return b.call(null, a);
};
cljs.core.ITransientAssociative = function() {
  return{};
}();
cljs.core._assoc_BANG_ = function(a, b, c) {
  if (a ? a.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 : a) {
    return a.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._assoc_BANG_[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._assoc_BANG_._, !d)) {
    throw cljs.core.missing_protocol.call(null, "ITransientAssociative.-assoc!", a);
  }
  return d.call(null, a, b, c);
};
cljs.core.ITransientMap = function() {
  return{};
}();
cljs.core._dissoc_BANG_ = function(a, b) {
  if (a ? a.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 : a) {
    return a.cljs$core$ITransientMap$_dissoc_BANG_$arity$2(a, b);
  }
  var c;
  c = cljs.core._dissoc_BANG_[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._dissoc_BANG_._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ITransientMap.-dissoc!", a);
  }
  return c.call(null, a, b);
};
cljs.core.ITransientVector = function() {
  return{};
}();
cljs.core._assoc_n_BANG_ = function(a, b, c) {
  if (a ? a.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 : a) {
    return a.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._assoc_n_BANG_[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._assoc_n_BANG_._, !d)) {
    throw cljs.core.missing_protocol.call(null, "ITransientVector.-assoc-n!", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._pop_BANG_ = function(a) {
  if (a ? a.cljs$core$ITransientVector$_pop_BANG_$arity$1 : a) {
    return a.cljs$core$ITransientVector$_pop_BANG_$arity$1(a);
  }
  var b;
  b = cljs.core._pop_BANG_[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._pop_BANG_._, !b)) {
    throw cljs.core.missing_protocol.call(null, "ITransientVector.-pop!", a);
  }
  return b.call(null, a);
};
cljs.core.ITransientSet = function() {
  return{};
}();
cljs.core._disjoin_BANG_ = function(a, b) {
  if (a ? a.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 : a) {
    return a.cljs$core$ITransientSet$_disjoin_BANG_$arity$2(a, b);
  }
  var c;
  c = cljs.core._disjoin_BANG_[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._disjoin_BANG_._, !c)) {
    throw cljs.core.missing_protocol.call(null, "ITransientSet.-disjoin!", a);
  }
  return c.call(null, a, b);
};
cljs.core.IComparable = function() {
  return{};
}();
cljs.core._compare = function(a, b) {
  if (a ? a.cljs$core$IComparable$_compare$arity$2 : a) {
    return a.cljs$core$IComparable$_compare$arity$2(a, b);
  }
  var c;
  c = cljs.core._compare[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._compare._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IComparable.-compare", a);
  }
  return c.call(null, a, b);
};
cljs.core.IChunk = function() {
  return{};
}();
cljs.core._drop_first = function(a) {
  if (a ? a.cljs$core$IChunk$_drop_first$arity$1 : a) {
    return a.cljs$core$IChunk$_drop_first$arity$1(a);
  }
  var b;
  b = cljs.core._drop_first[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._drop_first._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IChunk.-drop-first", a);
  }
  return b.call(null, a);
};
cljs.core.IChunkedSeq = function() {
  return{};
}();
cljs.core._chunked_first = function(a) {
  if (a ? a.cljs$core$IChunkedSeq$_chunked_first$arity$1 : a) {
    return a.cljs$core$IChunkedSeq$_chunked_first$arity$1(a);
  }
  var b;
  b = cljs.core._chunked_first[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._chunked_first._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-first", a);
  }
  return b.call(null, a);
};
cljs.core._chunked_rest = function(a) {
  if (a ? a.cljs$core$IChunkedSeq$_chunked_rest$arity$1 : a) {
    return a.cljs$core$IChunkedSeq$_chunked_rest$arity$1(a);
  }
  var b;
  b = cljs.core._chunked_rest[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._chunked_rest._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IChunkedSeq.-chunked-rest", a);
  }
  return b.call(null, a);
};
cljs.core.IChunkedNext = function() {
  return{};
}();
cljs.core._chunked_next = function(a) {
  if (a ? a.cljs$core$IChunkedNext$_chunked_next$arity$1 : a) {
    return a.cljs$core$IChunkedNext$_chunked_next$arity$1(a);
  }
  var b;
  b = cljs.core._chunked_next[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._chunked_next._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IChunkedNext.-chunked-next", a);
  }
  return b.call(null, a);
};
cljs.core.INamed = function() {
  return{};
}();
cljs.core._name = function(a) {
  if (a ? a.cljs$core$INamed$_name$arity$1 : a) {
    return a.cljs$core$INamed$_name$arity$1(a);
  }
  var b;
  b = cljs.core._name[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._name._, !b)) {
    throw cljs.core.missing_protocol.call(null, "INamed.-name", a);
  }
  return b.call(null, a);
};
cljs.core._namespace = function(a) {
  if (a ? a.cljs$core$INamed$_namespace$arity$1 : a) {
    return a.cljs$core$INamed$_namespace$arity$1(a);
  }
  var b;
  b = cljs.core._namespace[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._namespace._, !b)) {
    throw cljs.core.missing_protocol.call(null, "INamed.-namespace", a);
  }
  return b.call(null, a);
};
cljs.core.StringBufferWriter = function(a) {
  this.sb = a;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 1073741824;
};
cljs.core.StringBufferWriter.cljs$lang$type = !0;
cljs.core.StringBufferWriter.cljs$lang$ctorStr = "cljs.core/StringBufferWriter";
cljs.core.StringBufferWriter.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/StringBufferWriter");
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_write$arity$2 = function(a, b) {
  return this.sb.append(b);
};
cljs.core.StringBufferWriter.prototype.cljs$core$IWriter$_flush$arity$1 = function(a) {
  return null;
};
cljs.core.__GT_StringBufferWriter = function(a) {
  return new cljs.core.StringBufferWriter(a);
};
cljs.core.pr_str_STAR_ = function(a) {
  var b = new goog.string.StringBuffer, c = new cljs.core.StringBufferWriter(b);
  cljs.core._pr_writer.call(null, a, c, cljs.core.pr_opts.call(null));
  cljs.core._flush.call(null, c);
  return "" + cljs.core.str(b);
};
cljs.core.instance_QMARK_ = function(a, b) {
  return b instanceof a;
};
cljs.core.symbol_QMARK_ = function(a) {
  return a instanceof cljs.core.Symbol;
};
cljs.core.hash_symbol = function(a) {
  return cljs.core.hash_combine.call(null, cljs.core.hash.call(null, a.ns), cljs.core.hash.call(null, a.name));
};
cljs.core.compare_symbols = function(a, b) {
  if (cljs.core.truth_(cljs.core._EQ_.call(null, a, b))) {
    return 0;
  }
  if (cljs.core.truth_(function() {
    var c = cljs.core.not.call(null, a.ns);
    return c ? b.ns : c;
  }())) {
    return-1;
  }
  if (cljs.core.truth_(a.ns)) {
    if (cljs.core.not.call(null, b.ns)) {
      return 1;
    }
    var c = cljs.core.compare.call(null, a.ns, b.ns);
    return 0 === c ? cljs.core.compare.call(null, a.name, b.name) : c;
  }
  return new cljs.core.Keyword(null, "default", "default", 2558708147) ? cljs.core.compare.call(null, a.name, b.name) : null;
};
cljs.core.Symbol = function(a, b, c, d, e) {
  this.ns = a;
  this.name = b;
  this.str = c;
  this._hash = d;
  this._meta = e;
  this.cljs$lang$protocol_mask$partition0$ = 2154168321;
  this.cljs$lang$protocol_mask$partition1$ = 4096;
};
cljs.core.Symbol.cljs$lang$type = !0;
cljs.core.Symbol.cljs$lang$ctorStr = "cljs.core/Symbol";
cljs.core.Symbol.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Symbol");
};
cljs.core.Symbol.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, this.str);
};
cljs.core.Symbol.prototype.cljs$core$INamed$_name$arity$1 = function(a) {
  return this.name;
};
cljs.core.Symbol.prototype.cljs$core$INamed$_namespace$arity$1 = function(a) {
  return this.ns;
};
cljs.core.Symbol.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this._hash;
  return null != a ? a : this._hash = a = cljs.core.hash_symbol.call(null, this);
};
cljs.core.Symbol.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.Symbol(this.ns, this.name, this.str, this._hash, b);
};
cljs.core.Symbol.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this._meta;
};
cljs.core.Symbol.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return cljs.core._lookup.call(null, c, this, null);
      case 3:
        return cljs.core._lookup.call(null, c, this, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.Symbol.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return cljs.core._lookup.call(null, a, this, null);
};
cljs.core.Symbol.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, a, this, b);
};
cljs.core.Symbol.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return b instanceof cljs.core.Symbol ? this.str === b.str : !1;
};
cljs.core.Symbol.prototype.cljs$core$ICloneable$ = !0;
cljs.core.Symbol.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.Symbol(this.ns, this.name, this.str, this._hash, this._meta);
};
cljs.core.Symbol.prototype.toString = function() {
  return this.str;
};
cljs.core.__GT_Symbol = function(a, b, c, d, e) {
  return new cljs.core.Symbol(a, b, c, d, e);
};
cljs.core.symbol = function() {
  var a = null, b = function(b) {
    return b instanceof cljs.core.Symbol ? b : a.call(null, null, b);
  }, c = function(a, b) {
    var c = null != a ? [cljs.core.str(a), cljs.core.str("/"), cljs.core.str(b)].join("") : b;
    return new cljs.core.Symbol(a, b, c, null, null);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.clone = function(a) {
  return cljs.core._clone.call(null, a);
};
cljs.core.seq = function(a) {
  if (null == a) {
    return null;
  }
  if (a && (a.cljs$lang$protocol_mask$partition0$ & 8388608 || a.cljs$core$ISeqable$)) {
    return cljs.core._seq.call(null, a);
  }
  if (a instanceof Array || "string" === typeof a) {
    return 0 === a.length ? null : new cljs.core.IndexedSeq(a, 0);
  }
  if (cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeqable, a)) {
    return cljs.core._seq.call(null, a);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error([cljs.core.str(a), cljs.core.str("is not ISeqable")].join(""));
  }
  return null;
};
cljs.core.first = function(a) {
  if (null == a) {
    return null;
  }
  if (a && (a.cljs$lang$protocol_mask$partition0$ & 64 || a.cljs$core$ISeq$)) {
    return cljs.core._first.call(null, a);
  }
  a = cljs.core.seq.call(null, a);
  return null == a ? null : cljs.core._first.call(null, a);
};
cljs.core.rest = function(a) {
  return null != a ? a && (a.cljs$lang$protocol_mask$partition0$ & 64 || a.cljs$core$ISeq$) ? cljs.core._rest.call(null, a) : (a = cljs.core.seq.call(null, a)) ? cljs.core._rest.call(null, a) : cljs.core.List.EMPTY : cljs.core.List.EMPTY;
};
cljs.core.next = function(a) {
  return null == a ? null : a && (a.cljs$lang$protocol_mask$partition0$ & 128 || a.cljs$core$INext$) ? cljs.core._next.call(null, a) : cljs.core.seq.call(null, cljs.core.rest.call(null, a));
};
cljs.core._EQ_ = function() {
  var a = null, b = function(a, b) {
    return null == a ? null == b : a === b || cljs.core._equiv.call(null, a, b);
  }, c = function() {
    var b = function(b, c, d) {
      for (;;) {
        if (a.call(null, b, c)) {
          if (cljs.core.next.call(null, d)) {
            b = c, c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d);
          } else {
            return a.call(null, c, cljs.core.first.call(null, d));
          }
        } else {
          return!1;
        }
      }
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.ICounted["null"] = !0;
cljs.core._count["null"] = function(a) {
  return 0;
};
Date.prototype.cljs$core$IEquiv$ = !0;
Date.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return b instanceof Date && this.toString() === b.toString();
};
cljs.core.IEquiv.number = !0;
cljs.core._equiv.number = function(a, b) {
  return a === b;
};
cljs.core.IMeta["function"] = !0;
cljs.core._meta["function"] = function(a) {
  return null;
};
cljs.core.Fn["function"] = !0;
cljs.core.IHash._ = !0;
cljs.core._hash._ = function(a) {
  return goog.getUid(a);
};
cljs.core.inc = function(a) {
  return a + 1;
};
cljs.core.Reduced = function(a) {
  this.val = a;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32768;
};
cljs.core.Reduced.cljs$lang$type = !0;
cljs.core.Reduced.cljs$lang$ctorStr = "cljs.core/Reduced";
cljs.core.Reduced.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Reduced");
};
cljs.core.Reduced.prototype.cljs$core$IDeref$_deref$arity$1 = function(a) {
  return this.val;
};
cljs.core.__GT_Reduced = function(a) {
  return new cljs.core.Reduced(a);
};
cljs.core.reduced = function(a) {
  return new cljs.core.Reduced(a);
};
cljs.core.reduced_QMARK_ = function(a) {
  return a instanceof cljs.core.Reduced;
};
cljs.core.ci_reduce = function() {
  var a = null, b = function(a, b) {
    var c = cljs.core._count.call(null, a);
    if (0 === c) {
      return b.call(null);
    }
    for (var d = cljs.core._nth.call(null, a, 0), k = 1;;) {
      if (k < c) {
        d = b.call(null, d, cljs.core._nth.call(null, a, k));
        if (cljs.core.reduced_QMARK_.call(null, d)) {
          return cljs.core.deref.call(null, d);
        }
        k += 1;
      } else {
        return d;
      }
    }
  }, c = function(a, b, c) {
    for (var d = cljs.core._count.call(null, a), k = 0;;) {
      if (k < d) {
        c = b.call(null, c, cljs.core._nth.call(null, a, k));
        if (cljs.core.reduced_QMARK_.call(null, c)) {
          return cljs.core.deref.call(null, c);
        }
        k += 1;
      } else {
        return c;
      }
    }
  }, d = function(a, b, c, d) {
    for (var k = cljs.core._count.call(null, a);;) {
      if (d < k) {
        c = b.call(null, c, cljs.core._nth.call(null, a, d));
        if (cljs.core.reduced_QMARK_.call(null, c)) {
          return cljs.core.deref.call(null, c);
        }
        d += 1;
      } else {
        return c;
      }
    }
  }, a = function(a, f, g, h) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, f);
      case 3:
        return c.call(this, a, f, g);
      case 4:
        return d.call(this, a, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  return a;
}();
cljs.core.array_reduce = function() {
  var a = null, b = function(a, b) {
    var c = a.length;
    if (0 === a.length) {
      return b.call(null);
    }
    for (var d = a[0], k = 1;;) {
      if (k < c) {
        d = b.call(null, d, a[k]);
        if (cljs.core.reduced_QMARK_.call(null, d)) {
          return cljs.core.deref.call(null, d);
        }
        k += 1;
      } else {
        return d;
      }
    }
  }, c = function(a, b, c) {
    for (var d = a.length, k = 0;;) {
      if (k < d) {
        c = b.call(null, c, a[k]);
        if (cljs.core.reduced_QMARK_.call(null, c)) {
          return cljs.core.deref.call(null, c);
        }
        k += 1;
      } else {
        return c;
      }
    }
  }, d = function(a, b, c, d) {
    for (var k = a.length;;) {
      if (d < k) {
        c = b.call(null, c, a[d]);
        if (cljs.core.reduced_QMARK_.call(null, c)) {
          return cljs.core.deref.call(null, c);
        }
        d += 1;
      } else {
        return c;
      }
    }
  }, a = function(a, f, g, h) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, f);
      case 3:
        return c.call(this, a, f, g);
      case 4:
        return d.call(this, a, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  return a;
}();
cljs.core.counted_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 2 || a.cljs$core$ICounted$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICounted, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICounted, a);
};
cljs.core.indexed_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 16 || a.cljs$core$IIndexed$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IIndexed, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IIndexed, a);
};
cljs.core.IndexedSeq = function(a, b) {
  this.arr = a;
  this.i = b;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 166199550;
};
cljs.core.IndexedSeq.cljs$lang$type = !0;
cljs.core.IndexedSeq.cljs$lang$ctorStr = "cljs.core/IndexedSeq";
cljs.core.IndexedSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/IndexedSeq");
};
cljs.core.IndexedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return cljs.core.hash_coll.call(null, this);
};
cljs.core.IndexedSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return this.i + 1 < this.arr.length ? new cljs.core.IndexedSeq(this.arr, this.i + 1) : null;
};
cljs.core.IndexedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.IndexedSeq.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
  a = cljs.core._count.call(null, this);
  return 0 < a ? new cljs.core.RSeq(this, a - 1, null) : null;
};
cljs.core.IndexedSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.array_reduce.call(null, this.arr, b, this.arr[this.i], this.i + 1);
};
cljs.core.IndexedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.array_reduce.call(null, this.arr, b, c, this.i);
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.IndexedSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.arr.length - this.i;
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return this.arr[this.i];
};
cljs.core.IndexedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return this.i + 1 < this.arr.length ? new cljs.core.IndexedSeq(this.arr, this.i + 1) : cljs.core.List.EMPTY;
};
cljs.core.IndexedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.IndexedSeq.prototype.cljs$core$ICloneable$ = !0;
cljs.core.IndexedSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.IndexedSeq(this.arr, this.i);
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  var c = b + this.i;
  return c < this.arr.length ? this.arr[c] : null;
};
cljs.core.IndexedSeq.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  a = b + this.i;
  return a < this.arr.length ? this.arr[a] : c;
};
cljs.core.IndexedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.List.EMPTY;
};
cljs.core.__GT_IndexedSeq = function(a, b) {
  return new cljs.core.IndexedSeq(a, b);
};
cljs.core.prim_seq = function() {
  var a = null, b = function(b) {
    return a.call(null, b, 0);
  }, c = function(a, b) {
    return b < a.length ? new cljs.core.IndexedSeq(a, b) : null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.array_seq = function() {
  var a = null, b = function(a) {
    return cljs.core.prim_seq.call(null, a, 0);
  }, c = function(a, b) {
    return cljs.core.prim_seq.call(null, a, b);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.RSeq = function(a, b, c) {
  this.ci = a;
  this.i = b;
  this.meta = c;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374862;
};
cljs.core.RSeq.cljs$lang$type = !0;
cljs.core.RSeq.cljs$lang$ctorStr = "cljs.core/RSeq";
cljs.core.RSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/RSeq");
};
cljs.core.RSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return cljs.core.hash_coll.call(null, this);
};
cljs.core.RSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.RSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.RSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.RSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.RSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.i + 1;
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core._nth.call(null, this.ci, this.i);
};
cljs.core.RSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return 0 < this.i ? new cljs.core.RSeq(this.ci, this.i - 1, null) : null;
};
cljs.core.RSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.RSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.RSeq(this.ci, this.i, b);
};
cljs.core.RSeq.prototype.cljs$core$ICloneable$ = !0;
cljs.core.RSeq.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.RSeq(this.ci, this.i, this.meta);
};
cljs.core.RSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.RSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_RSeq = function(a, b, c) {
  return new cljs.core.RSeq(a, b, c);
};
cljs.core.second = function(a) {
  return cljs.core.first.call(null, cljs.core.next.call(null, a));
};
cljs.core.ffirst = function(a) {
  return cljs.core.first.call(null, cljs.core.first.call(null, a));
};
cljs.core.nfirst = function(a) {
  return cljs.core.next.call(null, cljs.core.first.call(null, a));
};
cljs.core.fnext = function(a) {
  return cljs.core.first.call(null, cljs.core.next.call(null, a));
};
cljs.core.nnext = function(a) {
  return cljs.core.next.call(null, cljs.core.next.call(null, a));
};
cljs.core.last = function(a) {
  for (;;) {
    var b = cljs.core.next.call(null, a);
    if (null != b) {
      a = b;
    } else {
      return cljs.core.first.call(null, a);
    }
  }
};
cljs.core.IEquiv._ = !0;
cljs.core._equiv._ = function(a, b) {
  return a === b;
};
cljs.core.conj = function() {
  var a = null, b = function(a, b) {
    return null != a ? cljs.core._conj.call(null, a, b) : cljs.core._conj.call(null, cljs.core.List.EMPTY, b);
  }, c = function() {
    var b = function(b, c, d) {
      for (;;) {
        if (cljs.core.truth_(d)) {
          b = a.call(null, b, c), c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d);
        } else {
          return a.call(null, b, c);
        }
      }
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.empty = function(a) {
  return null == a ? null : cljs.core._empty.call(null, a);
};
cljs.core.accumulating_seq_count = function(a) {
  a = cljs.core.seq.call(null, a);
  for (var b = 0;;) {
    if (cljs.core.counted_QMARK_.call(null, a)) {
      return b + cljs.core._count.call(null, a);
    }
    a = cljs.core.next.call(null, a);
    b += 1;
  }
};
cljs.core.count = function(a) {
  return null != a ? a && (a.cljs$lang$protocol_mask$partition0$ & 2 || a.cljs$core$ICounted$) ? cljs.core._count.call(null, a) : a instanceof Array ? a.length : "string" === typeof a ? a.length : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICounted, a) ? cljs.core._count.call(null, a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.accumulating_seq_count.call(null, a) : null : 0;
};
cljs.core.linear_traversal_nth = function() {
  var a = null, b = function(a, b) {
    for (;;) {
      if (null == a) {
        throw Error("Index out of bounds");
      }
      if (0 === b) {
        if (cljs.core.seq.call(null, a)) {
          return cljs.core.first.call(null, a);
        }
        throw Error("Index out of bounds");
      }
      if (cljs.core.indexed_QMARK_.call(null, a)) {
        return cljs.core._nth.call(null, a, b);
      }
      if (cljs.core.seq.call(null, a)) {
        var c = cljs.core.next.call(null, a), g = b - 1;
        a = c;
        b = g;
      } else {
        if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
          throw Error("Index out of bounds");
        }
        return null;
      }
    }
  }, c = function(a, b, c) {
    for (;;) {
      if (null == a) {
        return c;
      }
      if (0 === b) {
        return cljs.core.seq.call(null, a) ? cljs.core.first.call(null, a) : c;
      }
      if (cljs.core.indexed_QMARK_.call(null, a)) {
        return cljs.core._nth.call(null, a, b, c);
      }
      if (cljs.core.seq.call(null, a)) {
        a = cljs.core.next.call(null, a), b -= 1;
      } else {
        return new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null;
      }
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.nth = function() {
  var a = null, b = function(a, b) {
    if (null == a) {
      return null;
    }
    if (a && (a.cljs$lang$protocol_mask$partition0$ & 16 || a.cljs$core$IIndexed$)) {
      return cljs.core._nth.call(null, a, b);
    }
    if (a instanceof Array || "string" === typeof a) {
      return b < a.length ? a[b] : null;
    }
    if (cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IIndexed, a)) {
      return cljs.core._nth.call(null, a, b);
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      if (a ? a.cljs$lang$protocol_mask$partition0$ & 64 || a.cljs$core$ISeq$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a)) {
        return cljs.core.linear_traversal_nth.call(null, a, b);
      }
      throw Error([cljs.core.str("nth not supported on this type "), cljs.core.str(cljs.core.type__GT_str.call(null, cljs.core.type.call(null, a)))].join(""));
    }
    return null;
  }, c = function(a, b, c) {
    if (null != a) {
      if (a && (a.cljs$lang$protocol_mask$partition0$ & 16 || a.cljs$core$IIndexed$)) {
        return cljs.core._nth.call(null, a, b, c);
      }
      if (a instanceof Array || "string" === typeof a) {
        return b < a.length ? a[b] : c;
      }
      if (cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IIndexed, a)) {
        return cljs.core._nth.call(null, a, b);
      }
      if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
        if (a ? a.cljs$lang$protocol_mask$partition0$ & 64 || a.cljs$core$ISeq$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a)) {
          return cljs.core.linear_traversal_nth.call(null, a, b, c);
        }
        throw Error([cljs.core.str("nth not supported on this type "), cljs.core.str(cljs.core.type__GT_str.call(null, cljs.core.type.call(null, a)))].join(""));
      }
      return null;
    }
    return c;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.get = function() {
  var a = null, b = function(a, b) {
    if (null == a) {
      return null;
    }
    if (a && (a.cljs$lang$protocol_mask$partition0$ & 256 || a.cljs$core$ILookup$)) {
      return cljs.core._lookup.call(null, a, b);
    }
    if (a instanceof Array || "string" === typeof a) {
      return b < a.length ? a[b] : null;
    }
    if (cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ILookup, a)) {
      return cljs.core._lookup.call(null, a, b);
    }
    new cljs.core.Keyword(null, "else", "else", 1017020587);
    return null;
  }, c = function(a, b, c) {
    return null != a ? a && (a.cljs$lang$protocol_mask$partition0$ & 256 || a.cljs$core$ILookup$) ? cljs.core._lookup.call(null, a, b, c) : a instanceof Array ? b < a.length ? a[b] : c : "string" === typeof a ? b < a.length ? a[b] : c : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ILookup, a) ? cljs.core._lookup.call(null, a, b, c) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null : c;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.assoc = function() {
  var a = null, b = function(a, b, c) {
    return null != a ? cljs.core._assoc.call(null, a, b, c) : cljs.core.PersistentHashMap.fromArrays.call(null, [b], [c]);
  }, c = function() {
    var b = function(b, c, d, e) {
      for (;;) {
        if (b = a.call(null, b, c, d), cljs.core.truth_(e)) {
          c = cljs.core.first.call(null, e), d = cljs.core.second.call(null, e), e = cljs.core.nnext.call(null, e);
        } else {
          return b;
        }
      }
    }, c = function(a, c, e, k) {
      var l = null;
      3 < arguments.length && (l = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return b.call(this, a, c, e, l);
    };
    c.cljs$lang$maxFixedArity = 3;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.next(a);
      var k = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, k, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f, g) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, f, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.dissoc = function() {
  var a = null, b = function(a, b) {
    return null == a ? null : cljs.core._dissoc.call(null, a, b);
  }, c = function() {
    var b = function(b, c, d) {
      for (;;) {
        if (null == b) {
          return null;
        }
        b = a.call(null, b, c);
        if (cljs.core.truth_(d)) {
          c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d);
        } else {
          return b;
        }
      }
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.fn_QMARK_ = function(a) {
  var b = goog.isFunction(a);
  return b ? b : a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.cljs$core$Fn$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.Fn, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.Fn, a);
};
cljs.core.with_meta = function with_meta(b, c) {
  return cljs.core.fn_QMARK_.call(null, b) && !(b ? b.cljs$lang$protocol_mask$partition0$ & 262144 || b.cljs$core$IWithMeta$ || (b.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, b)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, b)) ? with_meta.call(null, function() {
    "undefined" === typeof cljs.core.t14906 && (cljs.core.t14906 = function(b, c, f, g) {
      this.meta = b;
      this.o = c;
      this.with_meta = f;
      this.meta14907 = g;
      this.cljs$lang$protocol_mask$partition1$ = 0;
      this.cljs$lang$protocol_mask$partition0$ = 393217;
    }, cljs.core.t14906.cljs$lang$type = !0, cljs.core.t14906.cljs$lang$ctorStr = "cljs.core/t14906", cljs.core.t14906.cljs$lang$ctorPrWriter = function(b, c, f) {
      return cljs.core._write.call(null, c, "cljs.core/t14906");
    }, cljs.core.t14906.prototype.call = function() {
      var b = function(b, c) {
        return cljs.core.apply.call(null, b.o, c);
      }, c = function(c, e) {
        c = this;
        var h = null;
        1 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
        return b.call(this, c, h);
      };
      c.cljs$lang$maxFixedArity = 1;
      c.cljs$lang$applyTo = function(c) {
        var e = cljs.core.first(c);
        c = cljs.core.rest(c);
        return b(e, c);
      };
      c.cljs$core$IFn$_invoke$arity$variadic = b;
      return c;
    }(), cljs.core.t14906.prototype.apply = function(b, c) {
      return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, c)));
    }, cljs.core.t14906.prototype.cljs$core$IFn$_invoke$arity$2 = function() {
      var b = function(b) {
        return cljs.core.apply.call(null, self__.o, b);
      }, c = function(c) {
        var e = null;
        0 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
        return b.call(this, e);
      };
      c.cljs$lang$maxFixedArity = 0;
      c.cljs$lang$applyTo = function(c) {
        c = cljs.core.seq(c);
        return b(c);
      };
      c.cljs$core$IFn$_invoke$arity$variadic = b;
      return c;
    }(), cljs.core.t14906.prototype.cljs$core$Fn$ = !0, cljs.core.t14906.prototype.cljs$core$IMeta$_meta$arity$1 = function(b) {
      return this.meta14907;
    }, cljs.core.t14906.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(b, c) {
      return new cljs.core.t14906(this.meta, this.o, this.with_meta, c);
    }, cljs.core.__GT_t14906 = function(b, c, f, g) {
      return new cljs.core.t14906(b, c, f, g);
    });
    return new cljs.core.t14906(c, b, with_meta, null);
  }(), c) : null == b ? null : cljs.core._with_meta.call(null, b, c);
};
cljs.core.meta = function(a) {
  var b;
  b = (b = null != a) ? a ? a.cljs$lang$protocol_mask$partition0$ & 131072 || a.cljs$core$IMeta$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMeta, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMeta, a) : b;
  return b ? cljs.core._meta.call(null, a) : null;
};
cljs.core.peek = function(a) {
  return null == a ? null : cljs.core._peek.call(null, a);
};
cljs.core.pop = function(a) {
  return null == a ? null : cljs.core._pop.call(null, a);
};
cljs.core.disj = function() {
  var a = null, b = function(a, b) {
    return null == a ? null : cljs.core._disjoin.call(null, a, b);
  }, c = function() {
    var b = function(b, c, d) {
      for (;;) {
        if (null == b) {
          return null;
        }
        b = a.call(null, b, c);
        if (cljs.core.truth_(d)) {
          c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d);
        } else {
          return b;
        }
      }
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.string_hash_cache = function() {
  return{};
}();
cljs.core.string_hash_cache_count = 0;
cljs.core.add_to_string_hash_cache = function(a) {
  var b = goog.string.hashCode(a);
  cljs.core.string_hash_cache[a] = b;
  cljs.core.string_hash_cache_count += 1;
  return b;
};
cljs.core.check_string_hash_cache = function(a) {
  255 < cljs.core.string_hash_cache_count && (cljs.core.string_hash_cache = {}, cljs.core.string_hash_cache_count = 0);
  var b = cljs.core.string_hash_cache[a];
  return "number" === typeof b ? b : cljs.core.add_to_string_hash_cache.call(null, a);
};
cljs.core.hash = function(a) {
  return a && (a.cljs$lang$protocol_mask$partition0$ & 4194304 || a.cljs$core$IHash$) ? cljs.core._hash.call(null, a) : "number" === typeof a ? Math.floor(a) % 2147483647 : !0 === a ? 1 : !1 === a ? 0 : "string" === typeof a ? cljs.core.check_string_hash_cache.call(null, a) : null == a ? 0 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core._hash.call(null, a) : null;
};
cljs.core.empty_QMARK_ = function(a) {
  return null == a || cljs.core.not.call(null, cljs.core.seq.call(null, a));
};
cljs.core.coll_QMARK_ = function(a) {
  return null == a ? !1 : a ? a.cljs$lang$protocol_mask$partition0$ & 8 || a.cljs$core$ICollection$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICollection, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ICollection, a);
};
cljs.core.set_QMARK_ = function(a) {
  return null == a ? !1 : a ? a.cljs$lang$protocol_mask$partition0$ & 4096 || a.cljs$core$ISet$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISet, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISet, a);
};
cljs.core.associative_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 512 || a.cljs$core$IAssociative$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IAssociative, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IAssociative, a);
};
cljs.core.sequential_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 16777216 || a.cljs$core$ISequential$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISequential, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISequential, a);
};
cljs.core.sorted_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 268435456 || a.cljs$core$ISorted$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISorted, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISorted, a);
};
cljs.core.reduceable_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 524288 || a.cljs$core$IReduce$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReduce, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReduce, a);
};
cljs.core.map_QMARK_ = function(a) {
  return null == a ? !1 : a ? a.cljs$lang$protocol_mask$partition0$ & 1024 || a.cljs$core$IMap$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMap, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMap, a);
};
cljs.core.vector_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 16384 || a.cljs$core$IVector$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IVector, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IVector, a);
};
cljs.core.chunked_seq_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition1$ & 512 || a.cljs$core$IChunkedSeq$ ? !0 : !1 : !1;
};
cljs.core.js_obj = function() {
  var a = null, b = function() {
    var a = function(a) {
      return cljs.core.apply.call(null, goog.object.create, a);
    }, b = function(b) {
      var d = null;
      0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return a.call(this, d);
    };
    b.cljs$lang$maxFixedArity = 0;
    b.cljs$lang$applyTo = function(b) {
      b = cljs.core.seq(b);
      return a(b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a) {
    switch(arguments.length) {
      case 0:
        return{};
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq(arguments, 0));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 0;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return{};
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.js_keys = function(a) {
  var b = [];
  goog.object.forEach(a, function(a, d, e) {
    return b.push(d);
  });
  return b;
};
cljs.core.js_delete = function(a, b) {
  return delete a[b];
};
cljs.core.array_copy = function(a, b, c, d, e) {
  for (;;) {
    if (0 === e) {
      return c;
    }
    c[d] = a[b];
    d += 1;
    e -= 1;
    b += 1;
  }
};
cljs.core.array_copy_downward = function(a, b, c, d, e) {
  b += e - 1;
  for (d += e - 1;;) {
    if (0 === e) {
      return c;
    }
    c[d] = a[b];
    d -= 1;
    e -= 1;
    b -= 1;
  }
};
cljs.core.lookup_sentinel = function() {
  return{};
}();
cljs.core.false_QMARK_ = function(a) {
  return!1 === a;
};
cljs.core.true_QMARK_ = function(a) {
  return!0 === a;
};
cljs.core.undefined_QMARK_ = function(a) {
  return void 0 === a;
};
cljs.core.seq_QMARK_ = function(a) {
  return null == a ? !1 : a ? a.cljs$lang$protocol_mask$partition0$ & 64 || a.cljs$core$ISeq$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeq, a);
};
cljs.core.seqable_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 8388608 || a.cljs$core$ISeqable$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeqable, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ISeqable, a);
};
cljs.core.boolean$ = function(a) {
  return cljs.core.truth_(a) ? !0 : !1;
};
cljs.core.ifn_QMARK_ = function(a) {
  var b = cljs.core.fn_QMARK_.call(null, a);
  return b ? b : a ? a.cljs$lang$protocol_mask$partition0$ & 1 || a.cljs$core$IFn$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IFn, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IFn, a);
};
cljs.core.integer_QMARK_ = function(a) {
  return "number" === typeof a && !isNaN(a) && Infinity !== a && parseFloat(a) === parseInt(a, 10);
};
cljs.core.contains_QMARK_ = function(a, b) {
  return cljs.core.get.call(null, a, b, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? !1 : !0;
};
cljs.core.find = function(a, b) {
  return null != a && cljs.core.associative_QMARK_.call(null, a) && cljs.core.contains_QMARK_.call(null, a, b) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, cljs.core.get.call(null, a, b)], null) : null;
};
cljs.core.distinct_QMARK_ = function() {
  var a = null, b = function(a, b) {
    return!cljs.core._EQ_.call(null, a, b);
  }, c = function() {
    var a = function(a, b, c) {
      if (cljs.core._EQ_.call(null, a, b)) {
        return!1;
      }
      a = cljs.core.PersistentHashSet.fromArray([b, a], !0);
      for (b = c;;) {
        var d = cljs.core.first.call(null, b);
        c = cljs.core.next.call(null, b);
        if (cljs.core.truth_(b)) {
          if (cljs.core.contains_QMARK_.call(null, a, d)) {
            return!1;
          }
          a = cljs.core.conj.call(null, a, d);
          b = c;
        } else {
          return!0;
        }
      }
    }, b = function(b, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, c, k);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.sequence = function(a) {
  return cljs.core.seq_QMARK_.call(null, a) ? a : (a = cljs.core.seq.call(null, a)) ? a : cljs.core.List.EMPTY;
};
cljs.core.compare = function(a, b) {
  if (a === b) {
    return 0;
  }
  if (null == a) {
    return-1;
  }
  if (null == b) {
    return 1;
  }
  if (cljs.core.type.call(null, a) === cljs.core.type.call(null, b)) {
    return a && (a.cljs$lang$protocol_mask$partition1$ & 2048 || a.cljs$core$IComparable$) ? cljs.core._compare.call(null, a, b) : goog.array.defaultCompare(a, b);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error("compare on non-nil objects of different types");
  }
  return null;
};
cljs.core.compare_indexed = function() {
  var a = null, b = function(b, c) {
    var f = cljs.core.count.call(null, b), g = cljs.core.count.call(null, c);
    return f < g ? -1 : f > g ? 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? a.call(null, b, c, f, 0) : null;
  }, c = function(a, b, c, g) {
    for (;;) {
      var h = cljs.core.compare.call(null, cljs.core.nth.call(null, a, g), cljs.core.nth.call(null, b, g));
      if (0 === h && g + 1 < c) {
        g += 1;
      } else {
        return h;
      }
    }
  }, a = function(a, e, f, g) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 4:
        return c.call(this, a, e, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  return a;
}();
cljs.core.fn__GT_comparator = function(a) {
  return cljs.core._EQ_.call(null, a, cljs.core.compare) ? cljs.core.compare : function(b, c) {
    var d = a.call(null, b, c);
    return "number" === typeof d ? d : cljs.core.truth_(d) ? -1 : cljs.core.truth_(a.call(null, c, b)) ? 1 : 0;
  };
};
cljs.core.sort = function() {
  var a = null, b = function(b) {
    return a.call(null, cljs.core.compare, b);
  }, c = function(a, b) {
    if (cljs.core.seq.call(null, b)) {
      var c = cljs.core.to_array.call(null, b);
      goog.array.stableSort(c, cljs.core.fn__GT_comparator.call(null, a));
      return cljs.core.seq.call(null, c);
    }
    return cljs.core.List.EMPTY;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.sort_by = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, cljs.core.compare, c);
  }, c = function(a, b, c) {
    return cljs.core.sort.call(null, function(c, f) {
      return cljs.core.fn__GT_comparator.call(null, b).call(null, a.call(null, c), a.call(null, f));
    }, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.seq_reduce = function() {
  var a = null, b = function(a, b) {
    var c = cljs.core.seq.call(null, b);
    return c ? cljs.core.reduce.call(null, a, cljs.core.first.call(null, c), cljs.core.next.call(null, c)) : a.call(null);
  }, c = function(a, b, c) {
    for (c = cljs.core.seq.call(null, c);;) {
      if (c) {
        b = a.call(null, b, cljs.core.first.call(null, c));
        if (cljs.core.reduced_QMARK_.call(null, b)) {
          return cljs.core.deref.call(null, b);
        }
        c = cljs.core.next.call(null, c);
      } else {
        return b;
      }
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.shuffle = function(a) {
  a = cljs.core.to_array.call(null, a);
  goog.array.shuffle(a);
  return cljs.core.vec.call(null, a);
};
cljs.core.reduce = function() {
  var a = null, b = function(a, b) {
    return b && (b.cljs$lang$protocol_mask$partition0$ & 524288 || b.cljs$core$IReduce$) ? cljs.core._reduce.call(null, b, a) : b instanceof Array ? cljs.core.array_reduce.call(null, b, a) : "string" === typeof b ? cljs.core.array_reduce.call(null, b, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReduce, b) ? cljs.core._reduce.call(null, b, a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.seq_reduce.call(null, a, b) : null;
  }, c = function(a, b, c) {
    return c && (c.cljs$lang$protocol_mask$partition0$ & 524288 || c.cljs$core$IReduce$) ? cljs.core._reduce.call(null, c, a, b) : c instanceof Array ? cljs.core.array_reduce.call(null, c, a, b) : "string" === typeof c ? cljs.core.array_reduce.call(null, c, a, b) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReduce, c) ? cljs.core._reduce.call(null, c, a, b) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.seq_reduce.call(null, a, b, c) : null;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.reduce_kv = function(a, b, c) {
  return null != c ? cljs.core._kv_reduce.call(null, c, a, b) : b;
};
cljs.core._PLUS_ = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b + c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 0;
      case 1:
        return a;
      case 2:
        return a + d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 0;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a + b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._ = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b - c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return-a;
      case 2:
        return a - d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return-a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a - b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._STAR_ = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b * c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 1;
      case 1:
        return a;
      case 2:
        return a * d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 1;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a * b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._SLASH_ = function() {
  var a = null, b = function(b) {
    return a.call(null, 1, b);
  }, c = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, a.call(null, b, c), d);
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return a / e;
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a / b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._LT_ = function() {
  var a = null, b = function() {
    var a = function(a, b, c) {
      for (;;) {
        if (a < b) {
          if (cljs.core.next.call(null, c)) {
            a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c);
          } else {
            return b < cljs.core.first.call(null, c);
          }
        } else {
          return!1;
        }
      }
    }, b = function(b, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, d, h);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(d, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return a < d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a < b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._LT__EQ_ = function() {
  var a = null, b = function() {
    var a = function(a, b, c) {
      for (;;) {
        if (a <= b) {
          if (cljs.core.next.call(null, c)) {
            a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c);
          } else {
            return b <= cljs.core.first.call(null, c);
          }
        } else {
          return!1;
        }
      }
    }, b = function(b, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, d, h);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(d, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return a <= d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a <= b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._GT_ = function() {
  var a = null, b = function() {
    var a = function(a, b, c) {
      for (;;) {
        if (a > b) {
          if (cljs.core.next.call(null, c)) {
            a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c);
          } else {
            return b > cljs.core.first.call(null, c);
          }
        } else {
          return!1;
        }
      }
    }, b = function(b, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, d, h);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(d, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return a > d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a > b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core._GT__EQ_ = function() {
  var a = null, b = function() {
    var a = function(a, b, c) {
      for (;;) {
        if (a >= b) {
          if (cljs.core.next.call(null, c)) {
            a = b, b = cljs.core.first.call(null, c), c = cljs.core.next.call(null, c);
          } else {
            return b >= cljs.core.first.call(null, c);
          }
        } else {
          return!1;
        }
      }
    }, b = function(b, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, d, h);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(d, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return a >= d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a >= b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.dec = function(a) {
  return a - 1;
};
cljs.core.max = function() {
  var a = null, b = function(a, b) {
    return a > b ? a : b;
  }, c = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b > c ? b : c, d);
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.min = function() {
  var a = null, b = function(a, b) {
    return a < b ? a : b;
  }, c = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b < c ? b : c, d);
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.byte$ = function(a) {
  return a;
};
cljs.core.char$ = function(a) {
  if ("number" === typeof a) {
    return String.fromCharCode(a);
  }
  if ("string" === typeof a && 1 === a.length) {
    return a;
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error("Argument to char must be a character or number");
  }
  return null;
};
cljs.core.short$ = function(a) {
  return a;
};
cljs.core.float$ = function(a) {
  return a;
};
cljs.core.double$ = function(a) {
  return a;
};
cljs.core.unchecked_byte = function(a) {
  return a;
};
cljs.core.unchecked_char = function(a) {
  return a;
};
cljs.core.unchecked_short = function(a) {
  return a;
};
cljs.core.unchecked_float = function(a) {
  return a;
};
cljs.core.unchecked_double = function(a) {
  return a;
};
cljs.core.unchecked_add = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b + c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 0;
      case 1:
        return a;
      case 2:
        return a + d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 0;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a + b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_add_int = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b + c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 0;
      case 1:
        return a;
      case 2:
        return a + d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 0;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a + b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_dec = function(a) {
  return a - 1;
};
cljs.core.unchecked_dec_int = function(a) {
  return a - 1;
};
cljs.core.unchecked_divide_int = function() {
  var a = null, b = function(b) {
    return a.call(null, 1, b);
  }, c = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, a.call(null, b, c), d);
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return a / e;
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a / b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_inc = function(a) {
  return a + 1;
};
cljs.core.unchecked_inc_int = function(a) {
  return a + 1;
};
cljs.core.unchecked_multiply = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b * c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 1;
      case 1:
        return a;
      case 2:
        return a * d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 1;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a * b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_multiply_int = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b * c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 0:
        return 1;
      case 1:
        return a;
      case 2:
        return a * d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return 1;
  };
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a * b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_negate = function(a) {
  return-a;
};
cljs.core.unchecked_negate_int = function(a) {
  return-a;
};
cljs.core.unchecked_remainder_int = function(a, b) {
  return cljs.core.mod.call(null, a, b);
};
cljs.core.unchecked_substract = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b - c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return-a;
      case 2:
        return a - d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return-a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a - b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.unchecked_substract_int = function() {
  var a = null, b = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b - c, d);
    }, d = function(a, d, g) {
      var h = null;
      2 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, d, h);
    };
    d.cljs$lang$maxFixedArity = 2;
    d.cljs$lang$applyTo = function(a) {
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(d, g, a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = b;
    return d;
  }(), a = function(a, d, e) {
    switch(arguments.length) {
      case 1:
        return-a;
      case 2:
        return a - d;
      default:
        return b.cljs$core$IFn$_invoke$arity$variadic(a, d, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = b.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return-a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return a - b;
  };
  a.cljs$core$IFn$_invoke$arity$variadic = b.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.fix = function(a) {
  return 0 <= a ? Math.floor.call(null, a) : Math.ceil.call(null, a);
};
cljs.core.int$ = function(a) {
  return a | 0;
};
cljs.core.unchecked_int = function(a) {
  return cljs.core.fix.call(null, a);
};
cljs.core.long$ = function(a) {
  return cljs.core.fix.call(null, a);
};
cljs.core.unchecked_long = function(a) {
  return cljs.core.fix.call(null, a);
};
cljs.core.booleans = function(a) {
  return a;
};
cljs.core.bytes = function(a) {
  return a;
};
cljs.core.chars = function(a) {
  return a;
};
cljs.core.shorts = function(a) {
  return a;
};
cljs.core.ints = function(a) {
  return a;
};
cljs.core.floats = function(a) {
  return a;
};
cljs.core.doubles = function(a) {
  return a;
};
cljs.core.longs = function(a) {
  return a;
};
cljs.core.js_mod = function(a, b) {
  return a % b;
};
cljs.core.mod = function(a, b) {
  return(a % b + b) % b;
};
cljs.core.quot = function(a, b) {
  return cljs.core.fix.call(null, (a - a % b) / b);
};
cljs.core.rem = function(a, b) {
  var c = cljs.core.quot.call(null, a, b);
  return a - b * c;
};
cljs.core.rand = function() {
  var a = null, b = function() {
    return Math.random.call(null);
  }, c = function(b) {
    return b * a.call(null);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
cljs.core.rand_int = function(a) {
  return cljs.core.fix.call(null, cljs.core.rand.call(null, a));
};
cljs.core.bit_xor = function(a, b) {
  return a ^ b;
};
cljs.core.bit_and = function(a, b) {
  return a & b;
};
cljs.core.bit_or = function(a, b) {
  return a | b;
};
cljs.core.bit_and_not = function(a, b) {
  return a & ~b;
};
cljs.core.bit_clear = function(a, b) {
  return a & ~(1 << b);
};
cljs.core.bit_flip = function(a, b) {
  return a ^ 1 << b;
};
cljs.core.bit_not = function(a) {
  return~a;
};
cljs.core.bit_set = function(a, b) {
  return a | 1 << b;
};
cljs.core.bit_test = function(a, b) {
  return 0 != (a & 1 << b);
};
cljs.core.bit_shift_left = function(a, b) {
  return a << b;
};
cljs.core.bit_shift_right = function(a, b) {
  return a >> b;
};
cljs.core.bit_shift_right_zero_fill = function(a, b) {
  return a >>> b;
};
cljs.core.unsigned_bit_shift_right = function(a, b) {
  return a >>> b;
};
cljs.core.bit_count = function(a) {
  a -= a >> 1 & 1431655765;
  a = (a & 858993459) + (a >> 2 & 858993459);
  return 16843009 * (a + (a >> 4) & 252645135) >> 24;
};
cljs.core._EQ__EQ_ = function() {
  var a = null, b = function(a, b) {
    return cljs.core._equiv.call(null, a, b);
  }, c = function() {
    var b = function(b, c, d) {
      for (;;) {
        if (a.call(null, b, c)) {
          if (cljs.core.next.call(null, d)) {
            b = c, c = cljs.core.first.call(null, d), d = cljs.core.next.call(null, d);
          } else {
            return a.call(null, c, cljs.core.first.call(null, d));
          }
        } else {
          return!1;
        }
      }
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return!0;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!0;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.pos_QMARK_ = function(a) {
  return 0 < a;
};
cljs.core.zero_QMARK_ = function(a) {
  return 0 === a;
};
cljs.core.neg_QMARK_ = function(a) {
  return 0 > a;
};
cljs.core.nthnext = function(a, b) {
  for (var c = b, d = cljs.core.seq.call(null, a);;) {
    if (d && 0 < c) {
      c -= 1, d = cljs.core.next.call(null, d);
    } else {
      return d;
    }
  }
};
cljs.core.str = function() {
  var a = null, b = function(a) {
    return null == a ? "" : a.toString();
  }, c = function() {
    var b = function(b, c) {
      for (var d = new goog.string.StringBuffer(a.call(null, b)), e = c;;) {
        if (cljs.core.truth_(e)) {
          d = d.append(a.call(null, cljs.core.first.call(null, e))), e = cljs.core.next.call(null, e);
        } else {
          return d.toString();
        }
      }
    }, c = function(a, c) {
      var e = null;
      1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return b.call(this, a, e);
    };
    c.cljs$lang$maxFixedArity = 1;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e) {
    switch(arguments.length) {
      case 0:
        return "";
      case 1:
        return b.call(this, a);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, cljs.core.array_seq(arguments, 1));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 1;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return "";
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.subs = function() {
  var a = null, a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return a.substring(c);
      case 3:
        return a.substring(c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = function(a, c) {
    return a.substring(c);
  };
  a.cljs$core$IFn$_invoke$arity$3 = function(a, c, d) {
    return a.substring(c, d);
  };
  return a;
}();
cljs.core.equiv_sequential = function(a, b) {
  return cljs.core.boolean$.call(null, cljs.core.sequential_QMARK_.call(null, b) ? function() {
    for (var c = cljs.core.seq.call(null, a), d = cljs.core.seq.call(null, b);;) {
      if (null == c) {
        return null == d;
      }
      if (null == d) {
        return!1;
      }
      if (cljs.core._EQ_.call(null, cljs.core.first.call(null, c), cljs.core.first.call(null, d))) {
        c = cljs.core.next.call(null, c), d = cljs.core.next.call(null, d);
      } else {
        return new cljs.core.Keyword(null, "else", "else", 1017020587) ? !1 : null;
      }
    }
  }() : null);
};
cljs.core.hash_combine = function(a, b) {
  return a ^ b + 2654435769 + (a << 6) + (a >> 2);
};
cljs.core.hash_coll = function(a) {
  if (cljs.core.seq.call(null, a)) {
    var b = cljs.core.hash.call(null, cljs.core.first.call(null, a));
    for (a = cljs.core.next.call(null, a);;) {
      if (null == a) {
        return b;
      }
      b = cljs.core.hash_combine.call(null, b, cljs.core.hash.call(null, cljs.core.first.call(null, a)));
      a = cljs.core.next.call(null, a);
    }
  } else {
    return 0;
  }
};
cljs.core.hash_imap = function(a) {
  var b = 0;
  for (a = cljs.core.seq.call(null, a);;) {
    if (a) {
      var c = cljs.core.first.call(null, a), b = (b + (cljs.core.hash.call(null, cljs.core.key.call(null, c)) ^ cljs.core.hash.call(null, cljs.core.val.call(null, c)))) % 4503599627370496;
      a = cljs.core.next.call(null, a);
    } else {
      return b;
    }
  }
};
cljs.core.hash_iset = function(a) {
  var b = 0;
  for (a = cljs.core.seq.call(null, a);;) {
    if (a) {
      var c = cljs.core.first.call(null, a), b = (b + cljs.core.hash.call(null, c)) % 4503599627370496;
      a = cljs.core.next.call(null, a);
    } else {
      return b;
    }
  }
};
cljs.core.extend_object_BANG_ = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null), h = cljs.core.name.call(null, h);
      a[h] = g;
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), d = cljs.core.name.call(null, d), a[d] = e, c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
cljs.core.List = function(a, b, c, d, e) {
  this.meta = a;
  this.first = b;
  this.rest = c;
  this.count = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 65937646;
};
cljs.core.List.cljs$lang$type = !0;
cljs.core.List.cljs$lang$ctorStr = "cljs.core/List";
cljs.core.List.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/List");
};
cljs.core.List.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.List.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return 1 === this.count ? null : this.rest;
};
cljs.core.List.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.List(this.meta, b, this, this.count + 1, null);
};
cljs.core.List.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.List.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.List.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.List.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.count;
};
cljs.core.List.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return this.first;
};
cljs.core.List.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  return cljs.core._rest.call(null, this);
};
cljs.core.List.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return this.first;
};
cljs.core.List.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return 1 === this.count ? cljs.core.List.EMPTY : this.rest;
};
cljs.core.List.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.List.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.List(b, this.first, this.rest, this.count, this.__hash);
};
cljs.core.List.prototype.cljs$core$ICloneable$ = !0;
cljs.core.List.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.List(this.meta, this.first, this.rest, this.count, this.__hash);
};
cljs.core.List.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.List.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.List.EMPTY;
};
cljs.core.__GT_List = function(a, b, c, d, e) {
  return new cljs.core.List(a, b, c, d, e);
};
cljs.core.EmptyList = function(a) {
  this.meta = a;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 65937614;
};
cljs.core.EmptyList.cljs$lang$type = !0;
cljs.core.EmptyList.cljs$lang$ctorStr = "cljs.core/EmptyList";
cljs.core.EmptyList.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/EmptyList");
};
cljs.core.EmptyList.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return 0;
};
cljs.core.EmptyList.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.List(this.meta, b, null, 1, null);
};
cljs.core.EmptyList.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.EmptyList.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.EmptyList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return 0;
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  throw Error("Can't pop empty list");
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return null;
};
cljs.core.EmptyList.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return cljs.core.List.EMPTY;
};
cljs.core.EmptyList.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.EmptyList.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.EmptyList(b);
};
cljs.core.EmptyList.prototype.cljs$core$ICloneable$ = !0;
cljs.core.EmptyList.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.EmptyList(this.meta);
};
cljs.core.EmptyList.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.EmptyList.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return this;
};
cljs.core.__GT_EmptyList = function(a) {
  return new cljs.core.EmptyList(a);
};
cljs.core.List.EMPTY = new cljs.core.EmptyList(null);
cljs.core.reversible_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 134217728 || a.cljs$core$IReversible$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReversible, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IReversible, a);
};
cljs.core.rseq = function(a) {
  return cljs.core._rseq.call(null, a);
};
cljs.core.reverse = function(a) {
  return cljs.core.reversible_QMARK_.call(null, a) ? cljs.core.rseq.call(null, a) : cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, a);
};
cljs.core.list = function() {
  var a = function(a) {
    var b;
    if (a instanceof cljs.core.IndexedSeq && 0 === a.i) {
      b = a.arr;
    } else {
      a: {
        for (b = [];;) {
          if (null != a) {
            b.push(cljs.core._first.call(null, a)), a = cljs.core._next.call(null, a);
          } else {
            break a;
          }
        }
        b = void 0;
      }
    }
    a = b.length;
    for (var e = cljs.core.List.EMPTY;;) {
      if (0 < a) {
        var f = a - 1, e = cljs.core._conj.call(null, e, b[a - 1]);
        a = f;
      } else {
        return e;
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.Cons = function(a, b, c, d) {
  this.meta = a;
  this.first = b;
  this.rest = c;
  this.__hash = d;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 65929452;
};
cljs.core.Cons.cljs$lang$type = !0;
cljs.core.Cons.cljs$lang$ctorStr = "cljs.core/Cons";
cljs.core.Cons.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Cons");
};
cljs.core.Cons.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.Cons.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return null == this.rest ? null : cljs.core.seq.call(null, this.rest);
};
cljs.core.Cons.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.Cons(null, b, this, this.__hash);
};
cljs.core.Cons.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.Cons.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.Cons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.Cons.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return this.first;
};
cljs.core.Cons.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return null == this.rest ? cljs.core.List.EMPTY : this.rest;
};
cljs.core.Cons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.Cons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.Cons(b, this.first, this.rest, this.__hash);
};
cljs.core.Cons.prototype.cljs$core$ICloneable$ = !0;
cljs.core.Cons.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.Cons(this.meta, this.first, this.rest, this.__hash);
};
cljs.core.Cons.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.Cons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_Cons = function(a, b, c, d) {
  return new cljs.core.Cons(a, b, c, d);
};
cljs.core.cons = function(a, b) {
  var c;
  c = (c = null == b) ? c : b ? b.cljs$lang$protocol_mask$partition0$ & 64 || b.cljs$core$ISeq$ ? !0 : !1 : !1;
  return c ? new cljs.core.Cons(null, a, b, null) : new cljs.core.Cons(null, a, cljs.core.seq.call(null, b), null);
};
cljs.core.list_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 33554432 || a.cljs$core$IList$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IList, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IList, a);
};
cljs.core.Keyword = function(a, b, c, d) {
  this.ns = a;
  this.name = b;
  this.fqn = c;
  this._hash = d;
  this.cljs$lang$protocol_mask$partition0$ = 2153775105;
  this.cljs$lang$protocol_mask$partition1$ = 4096;
};
cljs.core.Keyword.cljs$lang$type = !0;
cljs.core.Keyword.cljs$lang$ctorStr = "cljs.core/Keyword";
cljs.core.Keyword.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Keyword");
};
cljs.core.Keyword.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, [cljs.core.str(":"), cljs.core.str(this.fqn)].join(""));
};
cljs.core.Keyword.prototype.cljs$core$INamed$_name$arity$1 = function(a) {
  return this.name;
};
cljs.core.Keyword.prototype.cljs$core$INamed$_namespace$arity$1 = function(a) {
  return this.ns;
};
cljs.core.Keyword.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  null == this._hash && (this._hash = cljs.core.hash_combine.call(null, cljs.core.hash.call(null, this.ns), cljs.core.hash.call(null, this.name)) + 2654435769);
  return this._hash;
};
cljs.core.Keyword.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return cljs.core.get.call(null, c, this);
      case 3:
        return cljs.core.get.call(null, c, this, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.Keyword.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return cljs.core.get.call(null, a, this);
};
cljs.core.Keyword.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return cljs.core.get.call(null, a, this, b);
};
cljs.core.Keyword.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return b instanceof cljs.core.Keyword ? this.fqn === b.fqn : !1;
};
cljs.core.Keyword.prototype.cljs$core$ICloneable$ = !0;
cljs.core.Keyword.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.Keyword(this.ns, this.name, this.fqn, this._hash);
};
cljs.core.Keyword.prototype.toString = function() {
  return[cljs.core.str(":"), cljs.core.str(this.fqn)].join("");
};
cljs.core.__GT_Keyword = function(a, b, c, d) {
  return new cljs.core.Keyword(a, b, c, d);
};
cljs.core.keyword_QMARK_ = function(a) {
  return a instanceof cljs.core.Keyword;
};
cljs.core.keyword_identical_QMARK_ = function(a, b) {
  return a === b ? !0 : a instanceof cljs.core.Keyword && b instanceof cljs.core.Keyword ? a.fqn === b.fqn : !1;
};
cljs.core.namespace = function(a) {
  if (a && (a.cljs$lang$protocol_mask$partition1$ & 4096 || a.cljs$core$INamed$)) {
    return cljs.core._namespace.call(null, a);
  }
  throw Error([cljs.core.str("Doesn't support namespace: "), cljs.core.str(a)].join(""));
};
cljs.core.keyword = function() {
  var a = null, b = function(a) {
    if (a instanceof cljs.core.Keyword) {
      return a;
    }
    if (a instanceof cljs.core.Symbol) {
      return new cljs.core.Keyword(cljs.core.namespace.call(null, a), cljs.core.name.call(null, a), a.str, null);
    }
    if ("string" === typeof a) {
      var b = a.split("/");
      return 2 === b.length ? new cljs.core.Keyword(b[0], b[1], a, null) : new cljs.core.Keyword(null, b[0], a, null);
    }
    return null;
  }, c = function(a, b) {
    return new cljs.core.Keyword(a, b, [cljs.core.str(cljs.core.truth_(a) ? [cljs.core.str(a), cljs.core.str("/")].join("") : null), cljs.core.str(b)].join(""), null);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.LazySeq = function(a, b, c, d) {
  this.meta = a;
  this.fn = b;
  this.s = c;
  this.__hash = d;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
};
cljs.core.LazySeq.cljs$lang$type = !0;
cljs.core.LazySeq.cljs$lang$ctorStr = "cljs.core/LazySeq";
cljs.core.LazySeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/LazySeq");
};
cljs.core.LazySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.LazySeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  cljs.core._seq.call(null, this);
  return null == this.s ? null : cljs.core.next.call(null, this.s);
};
cljs.core.LazySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.LazySeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.LazySeq.prototype.sval = function() {
  null != this.fn && (this.s = this.fn.call(null), this.fn = null);
  return this.s;
};
cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.LazySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.LazySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  this.sval();
  if (null == this.s) {
    return null;
  }
  for (a = this.s;;) {
    if (a instanceof cljs.core.LazySeq) {
      a = a.sval();
    } else {
      return this.s = a, cljs.core.seq.call(null, this.s);
    }
  }
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  cljs.core._seq.call(null, this);
  return null == this.s ? null : cljs.core.first.call(null, this.s);
};
cljs.core.LazySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  cljs.core._seq.call(null, this);
  return null != this.s ? cljs.core.rest.call(null, this.s) : cljs.core.List.EMPTY;
};
cljs.core.LazySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.LazySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.LazySeq(b, this.fn, this.s, this.__hash);
};
cljs.core.LazySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.LazySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_LazySeq = function(a, b, c, d) {
  return new cljs.core.LazySeq(a, b, c, d);
};
cljs.core.ChunkBuffer = function(a, b) {
  this.buf = a;
  this.end = b;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 2;
};
cljs.core.ChunkBuffer.cljs$lang$type = !0;
cljs.core.ChunkBuffer.cljs$lang$ctorStr = "cljs.core/ChunkBuffer";
cljs.core.ChunkBuffer.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ChunkBuffer");
};
cljs.core.ChunkBuffer.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.end;
};
cljs.core.ChunkBuffer.prototype.add = function(a) {
  this.buf[this.end] = a;
  return this.end += 1;
};
cljs.core.ChunkBuffer.prototype.chunk = function(a) {
  a = new cljs.core.ArrayChunk(this.buf, 0, this.end);
  this.buf = null;
  return a;
};
cljs.core.__GT_ChunkBuffer = function(a, b) {
  return new cljs.core.ChunkBuffer(a, b);
};
cljs.core.chunk_buffer = function(a) {
  return new cljs.core.ChunkBuffer(Array(a), 0);
};
cljs.core.ArrayChunk = function(a, b, c) {
  this.arr = a;
  this.off = b;
  this.end = c;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 524306;
};
cljs.core.ArrayChunk.cljs$lang$type = !0;
cljs.core.ArrayChunk.cljs$lang$ctorStr = "cljs.core/ArrayChunk";
cljs.core.ArrayChunk.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ArrayChunk");
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.array_reduce.call(null, this.arr, b, this.arr[this.off], this.off + 1);
};
cljs.core.ArrayChunk.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.array_reduce.call(null, this.arr, b, c, this.off);
};
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$ = !0;
cljs.core.ArrayChunk.prototype.cljs$core$IChunk$_drop_first$arity$1 = function(a) {
  if (this.off === this.end) {
    throw Error("-drop-first of empty chunk");
  }
  return new cljs.core.ArrayChunk(this.arr, this.off + 1, this.end);
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  return this.arr[this.off + b];
};
cljs.core.ArrayChunk.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 <= b && b < this.end - this.off ? this.arr[this.off + b] : c;
};
cljs.core.ArrayChunk.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.end - this.off;
};
cljs.core.__GT_ArrayChunk = function(a, b, c) {
  return new cljs.core.ArrayChunk(a, b, c);
};
cljs.core.array_chunk = function() {
  var a = null, b = function(a) {
    return new cljs.core.ArrayChunk(a, 0, a.length);
  }, c = function(a, b) {
    return new cljs.core.ArrayChunk(a, b, a.length);
  }, d = function(a, b, c) {
    return new cljs.core.ArrayChunk(a, b, c);
  }, a = function(a, f, g) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, f);
      case 3:
        return d.call(this, a, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  return a;
}();
cljs.core.ChunkedCons = function(a, b, c, d) {
  this.chunk = a;
  this.more = b;
  this.meta = c;
  this.__hash = d;
  this.cljs$lang$protocol_mask$partition0$ = 31850732;
  this.cljs$lang$protocol_mask$partition1$ = 1536;
};
cljs.core.ChunkedCons.cljs$lang$type = !0;
cljs.core.ChunkedCons.cljs$lang$ctorStr = "cljs.core/ChunkedCons";
cljs.core.ChunkedCons.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ChunkedCons");
};
cljs.core.ChunkedCons.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.ChunkedCons.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  if (1 < cljs.core._count.call(null, this.chunk)) {
    return new cljs.core.ChunkedCons(cljs.core._drop_first.call(null, this.chunk), this.more, this.meta, null);
  }
  a = cljs.core._seq.call(null, this.more);
  return null == a ? null : a;
};
cljs.core.ChunkedCons.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.ChunkedCons.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core._nth.call(null, this.chunk, 0);
};
cljs.core.ChunkedCons.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return 1 < cljs.core._count.call(null, this.chunk) ? new cljs.core.ChunkedCons(cljs.core._drop_first.call(null, this.chunk), this.more, this.meta, null) : null == this.more ? cljs.core.List.EMPTY : this.more;
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(a) {
  return null == this.more ? null : this.more;
};
cljs.core.ChunkedCons.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.ChunkedCons.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.ChunkedCons(this.chunk, this.more, b, this.__hash);
};
cljs.core.ChunkedCons.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.ChunkedCons.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(a) {
  return this.chunk;
};
cljs.core.ChunkedCons.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(a) {
  return null == this.more ? cljs.core.List.EMPTY : this.more;
};
cljs.core.__GT_ChunkedCons = function(a, b, c, d) {
  return new cljs.core.ChunkedCons(a, b, c, d);
};
cljs.core.chunk_cons = function(a, b) {
  return 0 === cljs.core._count.call(null, a) ? b : new cljs.core.ChunkedCons(a, b, null, null);
};
cljs.core.chunk_append = function(a, b) {
  return a.add(b);
};
cljs.core.chunk = function(a) {
  return a.chunk();
};
cljs.core.chunk_first = function(a) {
  return cljs.core._chunked_first.call(null, a);
};
cljs.core.chunk_rest = function(a) {
  return cljs.core._chunked_rest.call(null, a);
};
cljs.core.chunk_next = function(a) {
  return a && (a.cljs$lang$protocol_mask$partition1$ & 1024 || a.cljs$core$IChunkedNext$) ? cljs.core._chunked_next.call(null, a) : cljs.core.seq.call(null, cljs.core._chunked_rest.call(null, a));
};
cljs.core.to_array = function(a) {
  for (var b = [];;) {
    if (cljs.core.seq.call(null, a)) {
      b.push(cljs.core.first.call(null, a)), a = cljs.core.next.call(null, a);
    } else {
      return b;
    }
  }
};
cljs.core.to_array_2d = function(a) {
  var b = Array(cljs.core.count.call(null, a)), c = 0;
  for (a = cljs.core.seq.call(null, a);;) {
    if (a) {
      b[c] = cljs.core.to_array.call(null, cljs.core.first.call(null, a)), c += 1, a = cljs.core.next.call(null, a);
    } else {
      break;
    }
  }
  return b;
};
cljs.core.int_array = function() {
  var a = null, b = function(b) {
    return "number" === typeof b ? a.call(null, b, null) : cljs.core.into_array.call(null, b);
  }, c = function(a, b) {
    var c = Array(a);
    if (cljs.core.seq_QMARK_.call(null, b)) {
      for (var g = 0, h = cljs.core.seq.call(null, b);;) {
        if (h && g < a) {
          c[g] = cljs.core.first.call(null, h), g += 1, h = cljs.core.next.call(null, h);
        } else {
          return c;
        }
      }
    } else {
      for (g = 0;;) {
        if (g < a) {
          c[g] = b, g += 1;
        } else {
          break;
        }
      }
      return c;
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.long_array = function() {
  var a = null, b = function(b) {
    return "number" === typeof b ? a.call(null, b, null) : cljs.core.into_array.call(null, b);
  }, c = function(a, b) {
    var c = Array(a);
    if (cljs.core.seq_QMARK_.call(null, b)) {
      for (var g = 0, h = cljs.core.seq.call(null, b);;) {
        if (h && g < a) {
          c[g] = cljs.core.first.call(null, h), g += 1, h = cljs.core.next.call(null, h);
        } else {
          return c;
        }
      }
    } else {
      for (g = 0;;) {
        if (g < a) {
          c[g] = b, g += 1;
        } else {
          break;
        }
      }
      return c;
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.double_array = function() {
  var a = null, b = function(b) {
    return "number" === typeof b ? a.call(null, b, null) : cljs.core.into_array.call(null, b);
  }, c = function(a, b) {
    var c = Array(a);
    if (cljs.core.seq_QMARK_.call(null, b)) {
      for (var g = 0, h = cljs.core.seq.call(null, b);;) {
        if (h && g < a) {
          c[g] = cljs.core.first.call(null, h), g += 1, h = cljs.core.next.call(null, h);
        } else {
          return c;
        }
      }
    } else {
      for (g = 0;;) {
        if (g < a) {
          c[g] = b, g += 1;
        } else {
          break;
        }
      }
      return c;
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.object_array = function() {
  var a = null, b = function(b) {
    return "number" === typeof b ? a.call(null, b, null) : cljs.core.into_array.call(null, b);
  }, c = function(a, b) {
    var c = Array(a);
    if (cljs.core.seq_QMARK_.call(null, b)) {
      for (var g = 0, h = cljs.core.seq.call(null, b);;) {
        if (h && g < a) {
          c[g] = cljs.core.first.call(null, h), g += 1, h = cljs.core.next.call(null, h);
        } else {
          return c;
        }
      }
    } else {
      for (g = 0;;) {
        if (g < a) {
          c[g] = b, g += 1;
        } else {
          break;
        }
      }
      return c;
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.bounded_count = function(a, b) {
  if (cljs.core.counted_QMARK_.call(null, a)) {
    return cljs.core.count.call(null, a);
  }
  for (var c = a, d = b, e = 0;;) {
    if (0 < d && cljs.core.seq.call(null, c)) {
      c = cljs.core.next.call(null, c), d -= 1, e += 1;
    } else {
      return e;
    }
  }
};
cljs.core.spread = function spread(b) {
  return null == b ? null : null == cljs.core.next.call(null, b) ? cljs.core.seq.call(null, cljs.core.first.call(null, b)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.cons.call(null, cljs.core.first.call(null, b), spread.call(null, cljs.core.next.call(null, b))) : null;
};
cljs.core.concat = function() {
  var a = null, b = function() {
    return new cljs.core.LazySeq(null, function() {
      return null;
    }, null, null);
  }, c = function(a) {
    return new cljs.core.LazySeq(null, function() {
      return a;
    }, null, null);
  }, d = function(b, c) {
    return new cljs.core.LazySeq(null, function() {
      var d = cljs.core.seq.call(null, b);
      return d ? cljs.core.chunked_seq_QMARK_.call(null, d) ? cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, d), a.call(null, cljs.core.chunk_rest.call(null, d), c)) : cljs.core.cons.call(null, cljs.core.first.call(null, d), a.call(null, cljs.core.rest.call(null, d), c)) : c;
    }, null, null);
  }, e = function() {
    var b = function(b, c, d) {
      return function n(a, b) {
        return new cljs.core.LazySeq(null, function() {
          var c = cljs.core.seq.call(null, a);
          return c ? cljs.core.chunked_seq_QMARK_.call(null, c) ? cljs.core.chunk_cons.call(null, cljs.core.chunk_first.call(null, c), n.call(null, cljs.core.chunk_rest.call(null, c), b)) : cljs.core.cons.call(null, cljs.core.first.call(null, c), n.call(null, cljs.core.rest.call(null, c), b)) : cljs.core.truth_(b) ? n.call(null, cljs.core.first.call(null, b), cljs.core.next.call(null, b)) : null;
        }, null, null);
      }.call(null, a.call(null, b, c), d);
    }, c = function(a, c, d) {
      var e = null;
      2 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, e);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var d = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, d, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, g, h) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
      case 2:
        return d.call(this, a, g);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  a.cljs$core$IFn$_invoke$arity$2 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.list_STAR_ = function() {
  var a = null, b = function(a) {
    return cljs.core.seq.call(null, a);
  }, c = function(a, b) {
    return cljs.core.cons.call(null, a, b);
  }, d = function(a, b, c) {
    return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, c));
  }, e = function(a, b, c, d) {
    return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, d)));
  }, f = function() {
    var a = function(a, b, c, d, e) {
      return cljs.core.cons.call(null, a, cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.spread.call(null, e)))));
    }, b = function(b, c, d, e, f) {
      var h = null;
      4 < arguments.length && (h = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
      return a.call(this, b, c, d, e, h);
    };
    b.cljs$lang$maxFixedArity = 4;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var f = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, f, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, h, k, l, m) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, h);
      case 3:
        return d.call(this, a, h, k);
      case 4:
        return e.call(this, a, h, k, l);
      default:
        return f.cljs$core$IFn$_invoke$arity$variadic(a, h, k, l, cljs.core.array_seq(arguments, 4));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 4;
  a.cljs$lang$applyTo = f.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$4 = e;
  a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.transient$ = function(a) {
  return cljs.core._as_transient.call(null, a);
};
cljs.core.persistent_BANG_ = function(a) {
  return cljs.core._persistent_BANG_.call(null, a);
};
cljs.core.conj_BANG_ = function(a, b) {
  return cljs.core._conj_BANG_.call(null, a, b);
};
cljs.core.assoc_BANG_ = function(a, b, c) {
  return cljs.core._assoc_BANG_.call(null, a, b, c);
};
cljs.core.dissoc_BANG_ = function(a, b) {
  return cljs.core._dissoc_BANG_.call(null, a, b);
};
cljs.core.pop_BANG_ = function(a) {
  return cljs.core._pop_BANG_.call(null, a);
};
cljs.core.disj_BANG_ = function(a, b) {
  return cljs.core._disjoin_BANG_.call(null, a, b);
};
cljs.core.apply_to = function(a, b, c) {
  var d = cljs.core.seq.call(null, c);
  if (0 === b) {
    return a.call(null);
  }
  c = cljs.core._first.call(null, d);
  var e = cljs.core._rest.call(null, d);
  if (1 === b) {
    return a.cljs$core$IFn$_invoke$arity$1 ? a.cljs$core$IFn$_invoke$arity$1(c) : a.call(null, c);
  }
  var d = cljs.core._first.call(null, e), f = cljs.core._rest.call(null, e);
  if (2 === b) {
    return a.cljs$core$IFn$_invoke$arity$2 ? a.cljs$core$IFn$_invoke$arity$2(c, d) : a.call(null, c, d);
  }
  var e = cljs.core._first.call(null, f), g = cljs.core._rest.call(null, f);
  if (3 === b) {
    return a.cljs$core$IFn$_invoke$arity$3 ? a.cljs$core$IFn$_invoke$arity$3(c, d, e) : a.call(null, c, d, e);
  }
  var f = cljs.core._first.call(null, g), h = cljs.core._rest.call(null, g);
  if (4 === b) {
    return a.cljs$core$IFn$_invoke$arity$4 ? a.cljs$core$IFn$_invoke$arity$4(c, d, e, f) : a.call(null, c, d, e, f);
  }
  g = cljs.core._first.call(null, h);
  h = cljs.core._rest.call(null, h);
  if (5 === b) {
    return a.cljs$core$IFn$_invoke$arity$5 ? a.cljs$core$IFn$_invoke$arity$5(c, d, e, f, g) : a.call(null, c, d, e, f, g);
  }
  a = cljs.core._first.call(null, h);
  var k = cljs.core._rest.call(null, h);
  if (6 === b) {
    return a.cljs$core$IFn$_invoke$arity$6 ? a.cljs$core$IFn$_invoke$arity$6(c, d, e, f, g, a) : a.call(null, c, d, e, f, g, a);
  }
  var h = cljs.core._first.call(null, k), l = cljs.core._rest.call(null, k);
  if (7 === b) {
    return a.cljs$core$IFn$_invoke$arity$7 ? a.cljs$core$IFn$_invoke$arity$7(c, d, e, f, g, a, h) : a.call(null, c, d, e, f, g, a, h);
  }
  var k = cljs.core._first.call(null, l), m = cljs.core._rest.call(null, l);
  if (8 === b) {
    return a.cljs$core$IFn$_invoke$arity$8 ? a.cljs$core$IFn$_invoke$arity$8(c, d, e, f, g, a, h, k) : a.call(null, c, d, e, f, g, a, h, k);
  }
  var l = cljs.core._first.call(null, m), n = cljs.core._rest.call(null, m);
  if (9 === b) {
    return a.cljs$core$IFn$_invoke$arity$9 ? a.cljs$core$IFn$_invoke$arity$9(c, d, e, f, g, a, h, k, l) : a.call(null, c, d, e, f, g, a, h, k, l);
  }
  var m = cljs.core._first.call(null, n), p = cljs.core._rest.call(null, n);
  if (10 === b) {
    return a.cljs$core$IFn$_invoke$arity$10 ? a.cljs$core$IFn$_invoke$arity$10(c, d, e, f, g, a, h, k, l, m) : a.call(null, c, d, e, f, g, a, h, k, l, m);
  }
  var n = cljs.core._first.call(null, p), q = cljs.core._rest.call(null, p);
  if (11 === b) {
    return a.cljs$core$IFn$_invoke$arity$11 ? a.cljs$core$IFn$_invoke$arity$11(c, d, e, f, g, a, h, k, l, m, n) : a.call(null, c, d, e, f, g, a, h, k, l, m, n);
  }
  var p = cljs.core._first.call(null, q), r = cljs.core._rest.call(null, q);
  if (12 === b) {
    return a.cljs$core$IFn$_invoke$arity$12 ? a.cljs$core$IFn$_invoke$arity$12(c, d, e, f, g, a, h, k, l, m, n, p) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p);
  }
  var q = cljs.core._first.call(null, r), s = cljs.core._rest.call(null, r);
  if (13 === b) {
    return a.cljs$core$IFn$_invoke$arity$13 ? a.cljs$core$IFn$_invoke$arity$13(c, d, e, f, g, a, h, k, l, m, n, p, q) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q);
  }
  var r = cljs.core._first.call(null, s), t = cljs.core._rest.call(null, s);
  if (14 === b) {
    return a.cljs$core$IFn$_invoke$arity$14 ? a.cljs$core$IFn$_invoke$arity$14(c, d, e, f, g, a, h, k, l, m, n, p, q, r) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r);
  }
  var s = cljs.core._first.call(null, t), v = cljs.core._rest.call(null, t);
  if (15 === b) {
    return a.cljs$core$IFn$_invoke$arity$15 ? a.cljs$core$IFn$_invoke$arity$15(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s);
  }
  var t = cljs.core._first.call(null, v), u = cljs.core._rest.call(null, v);
  if (16 === b) {
    return a.cljs$core$IFn$_invoke$arity$16 ? a.cljs$core$IFn$_invoke$arity$16(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t);
  }
  var v = cljs.core._first.call(null, u), w = cljs.core._rest.call(null, u);
  if (17 === b) {
    return a.cljs$core$IFn$_invoke$arity$17 ? a.cljs$core$IFn$_invoke$arity$17(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v);
  }
  var u = cljs.core._first.call(null, w), A = cljs.core._rest.call(null, w);
  if (18 === b) {
    return a.cljs$core$IFn$_invoke$arity$18 ? a.cljs$core$IFn$_invoke$arity$18(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u);
  }
  w = cljs.core._first.call(null, A);
  A = cljs.core._rest.call(null, A);
  if (19 === b) {
    return a.cljs$core$IFn$_invoke$arity$19 ? a.cljs$core$IFn$_invoke$arity$19(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u, w) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u, w);
  }
  var J = cljs.core._first.call(null, A);
  cljs.core._rest.call(null, A);
  if (20 === b) {
    return a.cljs$core$IFn$_invoke$arity$20 ? a.cljs$core$IFn$_invoke$arity$20(c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u, w, J) : a.call(null, c, d, e, f, g, a, h, k, l, m, n, p, q, r, s, t, v, u, w, J);
  }
  throw Error("Only up to 20 arguments supported on functions");
};
cljs.core.apply = function() {
  var a = null, b = function(a, b) {
    var c = a.cljs$lang$maxFixedArity;
    if (a.cljs$lang$applyTo) {
      var d = cljs.core.bounded_count.call(null, b, c + 1);
      return d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b);
    }
    return a.apply(a, cljs.core.to_array.call(null, b));
  }, c = function(a, b, c) {
    b = cljs.core.list_STAR_.call(null, b, c);
    c = a.cljs$lang$maxFixedArity;
    if (a.cljs$lang$applyTo) {
      var d = cljs.core.bounded_count.call(null, b, c + 1);
      return d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b);
    }
    return a.apply(a, cljs.core.to_array.call(null, b));
  }, d = function(a, b, c, d) {
    b = cljs.core.list_STAR_.call(null, b, c, d);
    c = a.cljs$lang$maxFixedArity;
    return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b));
  }, e = function(a, b, c, d, e) {
    b = cljs.core.list_STAR_.call(null, b, c, d, e);
    c = a.cljs$lang$maxFixedArity;
    return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b));
  }, f = function() {
    var a = function(a, b, c, d, e, f) {
      b = cljs.core.cons.call(null, b, cljs.core.cons.call(null, c, cljs.core.cons.call(null, d, cljs.core.cons.call(null, e, cljs.core.spread.call(null, f)))));
      c = a.cljs$lang$maxFixedArity;
      return a.cljs$lang$applyTo ? (d = cljs.core.bounded_count.call(null, b, c + 1), d <= c ? cljs.core.apply_to.call(null, a, d, b) : a.cljs$lang$applyTo(b)) : a.apply(a, cljs.core.to_array.call(null, b));
    }, b = function(b, c, d, e, f, h) {
      var r = null;
      5 < arguments.length && (r = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
      return a.call(this, b, c, d, e, f, r);
    };
    b.cljs$lang$maxFixedArity = 5;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var f = cljs.core.first(b);
      b = cljs.core.next(b);
      var h = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, f, h, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, h, k, l, m, n) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, h);
      case 3:
        return c.call(this, a, h, k);
      case 4:
        return d.call(this, a, h, k, l);
      case 5:
        return e.call(this, a, h, k, l, m);
      default:
        return f.cljs$core$IFn$_invoke$arity$variadic(a, h, k, l, m, cljs.core.array_seq(arguments, 5));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 5;
  a.cljs$lang$applyTo = f.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$5 = e;
  a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.vary_meta = function() {
  var a = null, b = function(a, b) {
    return cljs.core.with_meta.call(null, a, b.call(null, cljs.core.meta.call(null, a)));
  }, c = function(a, b, c) {
    return cljs.core.with_meta.call(null, a, b.call(null, cljs.core.meta.call(null, a), c));
  }, d = function(a, b, c, d) {
    return cljs.core.with_meta.call(null, a, b.call(null, cljs.core.meta.call(null, a), c, d));
  }, e = function(a, b, c, d, e) {
    return cljs.core.with_meta.call(null, a, b.call(null, cljs.core.meta.call(null, a), c, d, e));
  }, f = function(a, b, c, d, e, f) {
    return cljs.core.with_meta.call(null, a, b.call(null, cljs.core.meta.call(null, a), c, d, e, f));
  }, g = function() {
    var a = function(a, b, c, d, e, f, g) {
      return cljs.core.with_meta.call(null, a, cljs.core.apply.call(null, b, cljs.core.meta.call(null, a), c, d, e, f, g));
    }, b = function(b, c, d, e, f, g, k) {
      var t = null;
      6 < arguments.length && (t = cljs.core.array_seq(Array.prototype.slice.call(arguments, 6), 0));
      return a.call(this, b, c, d, e, f, g, t);
    };
    b.cljs$lang$maxFixedArity = 6;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var f = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.next(b);
      var k = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, f, g, k, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, k, l, m, n, p, q) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, k);
      case 3:
        return c.call(this, a, k, l);
      case 4:
        return d.call(this, a, k, l, m);
      case 5:
        return e.call(this, a, k, l, m, n);
      case 6:
        return f.call(this, a, k, l, m, n, p);
      default:
        return g.cljs$core$IFn$_invoke$arity$variadic(a, k, l, m, n, p, cljs.core.array_seq(arguments, 6));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 6;
  a.cljs$lang$applyTo = g.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$5 = e;
  a.cljs$core$IFn$_invoke$arity$6 = f;
  a.cljs$core$IFn$_invoke$arity$variadic = g.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.not_EQ_ = function() {
  var a = null, b = function(a, b) {
    return!cljs.core._EQ_.call(null, a, b);
  }, c = function() {
    var a = function(a, b, c) {
      return cljs.core.not.call(null, cljs.core.apply.call(null, cljs.core._EQ_, a, b, c));
    }, b = function(b, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, c, k);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return!1;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return!1;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.not_empty = function(a) {
  return cljs.core.seq.call(null, a) ? a : null;
};
cljs.core.every_QMARK_ = function(a, b) {
  for (;;) {
    if (null == cljs.core.seq.call(null, b)) {
      return!0;
    }
    if (cljs.core.truth_(a.call(null, cljs.core.first.call(null, b)))) {
      var c = a, d = cljs.core.next.call(null, b);
      a = c;
      b = d;
    } else {
      return new cljs.core.Keyword(null, "else", "else", 1017020587) ? !1 : null;
    }
  }
};
cljs.core.not_every_QMARK_ = function(a, b) {
  return!cljs.core.every_QMARK_.call(null, a, b);
};
cljs.core.some = function(a, b) {
  for (;;) {
    if (cljs.core.seq.call(null, b)) {
      var c = a.call(null, cljs.core.first.call(null, b));
      if (cljs.core.truth_(c)) {
        return c;
      }
      var c = a, d = cljs.core.next.call(null, b);
      a = c;
      b = d;
    } else {
      return null;
    }
  }
};
cljs.core.not_any_QMARK_ = function(a, b) {
  return cljs.core.not.call(null, cljs.core.some.call(null, a, b));
};
cljs.core.even_QMARK_ = function(a) {
  if (cljs.core.integer_QMARK_.call(null, a)) {
    return 0 === (a & 1);
  }
  throw Error([cljs.core.str("Argument must be an integer: "), cljs.core.str(a)].join(""));
};
cljs.core.odd_QMARK_ = function(a) {
  return!cljs.core.even_QMARK_.call(null, a);
};
cljs.core.identity = function(a) {
  return a;
};
cljs.core.complement = function(a) {
  return function() {
    var b = null, c = function() {
      var b = function(b, c, d) {
        return cljs.core.not.call(null, cljs.core.apply.call(null, a, b, c, d));
      }, c = function(a, c, e) {
        var k = null;
        2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
        return b.call(this, a, c, k);
      };
      c.cljs$lang$maxFixedArity = 2;
      c.cljs$lang$applyTo = function(a) {
        var c = cljs.core.first(a);
        a = cljs.core.next(a);
        var e = cljs.core.first(a);
        a = cljs.core.rest(a);
        return b(c, e, a);
      };
      c.cljs$core$IFn$_invoke$arity$variadic = b;
      return c;
    }(), b = function(b, e, f) {
      switch(arguments.length) {
        case 0:
          return cljs.core.not.call(null, a.call(null));
        case 1:
          return cljs.core.not.call(null, a.call(null, b));
        case 2:
          return cljs.core.not.call(null, a.call(null, b, e));
        default:
          return c.cljs$core$IFn$_invoke$arity$variadic(b, e, cljs.core.array_seq(arguments, 2));
      }
      throw Error("Invalid arity: " + arguments.length);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = c.cljs$lang$applyTo;
    return b;
  }();
};
cljs.core.constantly = function(a) {
  return function() {
    var b = function(b) {
      0 < arguments.length && cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0);
      return a;
    };
    b.cljs$lang$maxFixedArity = 0;
    b.cljs$lang$applyTo = function(b) {
      cljs.core.seq(b);
      return a;
    };
    b.cljs$core$IFn$_invoke$arity$variadic = function(b) {
      return a;
    };
    return b;
  }();
};
cljs.core.comp = function() {
  var a = null, b = function() {
    return cljs.core.identity;
  }, c = function(a, b) {
    return function() {
      var c = null, d = function() {
        var c = function(c, d, e, h) {
          return a.call(null, cljs.core.apply.call(null, b, c, d, e, h));
        }, d = function(a, b, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return c.call(this, a, b, d, f);
        };
        d.cljs$lang$maxFixedArity = 3;
        d.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return c(b, d, e, a);
        };
        d.cljs$core$IFn$_invoke$arity$variadic = c;
        return d;
      }(), c = function(c, e, h, p) {
        switch(arguments.length) {
          case 0:
            return a.call(null, b.call(null));
          case 1:
            return a.call(null, b.call(null, c));
          case 2:
            return a.call(null, b.call(null, c, e));
          case 3:
            return a.call(null, b.call(null, c, e, h));
          default:
            return d.cljs$core$IFn$_invoke$arity$variadic(c, e, h, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      c.cljs$lang$maxFixedArity = 3;
      c.cljs$lang$applyTo = d.cljs$lang$applyTo;
      return c;
    }();
  }, d = function(a, b, c) {
    return function() {
      var d = null, e = function() {
        var d = function(d, e, k, l) {
          return a.call(null, b.call(null, cljs.core.apply.call(null, c, d, e, k, l)));
        }, e = function(a, b, c, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return d.call(this, a, b, c, f);
        };
        e.cljs$lang$maxFixedArity = 3;
        e.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return d(b, c, e, a);
        };
        e.cljs$core$IFn$_invoke$arity$variadic = d;
        return e;
      }(), d = function(d, k, p, q) {
        switch(arguments.length) {
          case 0:
            return a.call(null, b.call(null, c.call(null)));
          case 1:
            return a.call(null, b.call(null, c.call(null, d)));
          case 2:
            return a.call(null, b.call(null, c.call(null, d, k)));
          case 3:
            return a.call(null, b.call(null, c.call(null, d, k, p)));
          default:
            return e.cljs$core$IFn$_invoke$arity$variadic(d, k, p, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      d.cljs$lang$maxFixedArity = 3;
      d.cljs$lang$applyTo = e.cljs$lang$applyTo;
      return d;
    }();
  }, e = function() {
    var a = function(a, b, c, d) {
      var e = cljs.core.reverse.call(null, cljs.core.list_STAR_.call(null, a, b, c, d));
      return function() {
        var a = function(a) {
          a = cljs.core.apply.call(null, cljs.core.first.call(null, e), a);
          for (var b = cljs.core.next.call(null, e);;) {
            if (b) {
              a = cljs.core.first.call(null, b).call(null, a), b = cljs.core.next.call(null, b);
            } else {
              return a;
            }
          }
        }, b = function(b) {
          var c = null;
          0 < arguments.length && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
          return a.call(this, c);
        };
        b.cljs$lang$maxFixedArity = 0;
        b.cljs$lang$applyTo = function(b) {
          b = cljs.core.seq(b);
          return a(b);
        };
        b.cljs$core$IFn$_invoke$arity$variadic = a;
        return b;
      }();
    }, b = function(b, c, d, e) {
      var g = null;
      3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return a.call(this, b, c, d, g);
    };
    b.cljs$lang$maxFixedArity = 3;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return a;
      case 2:
        return c.call(this, a, g);
      case 3:
        return d.call(this, a, g, h);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.partial = function() {
  var a = null, b = function(a, b) {
    return function() {
      var c = function(c) {
        return cljs.core.apply.call(null, a, b, c);
      }, d = function(a) {
        var b = null;
        0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
        return c.call(this, b);
      };
      d.cljs$lang$maxFixedArity = 0;
      d.cljs$lang$applyTo = function(a) {
        a = cljs.core.seq(a);
        return c(a);
      };
      d.cljs$core$IFn$_invoke$arity$variadic = c;
      return d;
    }();
  }, c = function(a, b, c) {
    return function() {
      var d = function(d) {
        return cljs.core.apply.call(null, a, b, c, d);
      }, e = function(a) {
        var b = null;
        0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
        return d.call(this, b);
      };
      e.cljs$lang$maxFixedArity = 0;
      e.cljs$lang$applyTo = function(a) {
        a = cljs.core.seq(a);
        return d(a);
      };
      e.cljs$core$IFn$_invoke$arity$variadic = d;
      return e;
    }();
  }, d = function(a, b, c, d) {
    return function() {
      var e = function(e) {
        return cljs.core.apply.call(null, a, b, c, d, e);
      }, m = function(a) {
        var b = null;
        0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
        return e.call(this, b);
      };
      m.cljs$lang$maxFixedArity = 0;
      m.cljs$lang$applyTo = function(a) {
        a = cljs.core.seq(a);
        return e(a);
      };
      m.cljs$core$IFn$_invoke$arity$variadic = e;
      return m;
    }();
  }, e = function() {
    var a = function(a, b, c, d, e) {
      return function() {
        var f = function(f) {
          return cljs.core.apply.call(null, a, b, c, d, cljs.core.concat.call(null, e, f));
        }, g = function(a) {
          var b = null;
          0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
          return f.call(this, b);
        };
        g.cljs$lang$maxFixedArity = 0;
        g.cljs$lang$applyTo = function(a) {
          a = cljs.core.seq(a);
          return f(a);
        };
        g.cljs$core$IFn$_invoke$arity$variadic = f;
        return g;
      }();
    }, b = function(b, c, d, e, g) {
      var p = null;
      4 < arguments.length && (p = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
      return a.call(this, b, c, d, e, p);
    };
    b.cljs$lang$maxFixedArity = 4;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k, l) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, g);
      case 3:
        return c.call(this, a, g, h);
      case 4:
        return d.call(this, a, g, h, k);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, k, cljs.core.array_seq(arguments, 4));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 4;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.fnil = function() {
  var a = null, b = function(a, b) {
    return function() {
      var c = null, d = function() {
        var c = function(c, d, g, h) {
          return cljs.core.apply.call(null, a, null == c ? b : c, d, g, h);
        }, d = function(a, b, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return c.call(this, a, b, d, f);
        };
        d.cljs$lang$maxFixedArity = 3;
        d.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return c(b, d, e, a);
        };
        d.cljs$core$IFn$_invoke$arity$variadic = c;
        return d;
      }(), c = function(c, g, m, n) {
        switch(arguments.length) {
          case 1:
            return a.call(null, null == c ? b : c);
          case 2:
            return a.call(null, null == c ? b : c, g);
          case 3:
            return a.call(null, null == c ? b : c, g, m);
          default:
            return d.cljs$core$IFn$_invoke$arity$variadic(c, g, m, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      c.cljs$lang$maxFixedArity = 3;
      c.cljs$lang$applyTo = d.cljs$lang$applyTo;
      return c;
    }();
  }, c = function(a, b, c) {
    return function() {
      var d = null, k = function() {
        var d = function(d, h, k, l) {
          return cljs.core.apply.call(null, a, null == d ? b : d, null == h ? c : h, k, l);
        }, h = function(a, b, c, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return d.call(this, a, b, c, f);
        };
        h.cljs$lang$maxFixedArity = 3;
        h.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return d(b, c, e, a);
        };
        h.cljs$core$IFn$_invoke$arity$variadic = d;
        return h;
      }(), d = function(d, h, n, p) {
        switch(arguments.length) {
          case 2:
            return a.call(null, null == d ? b : d, null == h ? c : h);
          case 3:
            return a.call(null, null == d ? b : d, null == h ? c : h, n);
          default:
            return k.cljs$core$IFn$_invoke$arity$variadic(d, h, n, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      d.cljs$lang$maxFixedArity = 3;
      d.cljs$lang$applyTo = k.cljs$lang$applyTo;
      return d;
    }();
  }, d = function(a, b, c, d) {
    return function() {
      var k = null, l = function() {
        var k = function(k, l, m, n) {
          return cljs.core.apply.call(null, a, null == k ? b : k, null == l ? c : l, null == m ? d : m, n);
        }, l = function(a, b, c, d) {
          var e = null;
          3 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return k.call(this, a, b, c, e);
        };
        l.cljs$lang$maxFixedArity = 3;
        l.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.rest(a);
          return k(b, c, d, a);
        };
        l.cljs$core$IFn$_invoke$arity$variadic = k;
        return l;
      }(), k = function(k, n, p, q) {
        switch(arguments.length) {
          case 2:
            return a.call(null, null == k ? b : k, null == n ? c : n);
          case 3:
            return a.call(null, null == k ? b : k, null == n ? c : n, null == p ? d : p);
          default:
            return l.cljs$core$IFn$_invoke$arity$variadic(k, n, p, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      k.cljs$lang$maxFixedArity = 3;
      k.cljs$lang$applyTo = l.cljs$lang$applyTo;
      return k;
    }();
  }, a = function(a, f, g, h) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, f);
      case 3:
        return c.call(this, a, f, g);
      case 4:
        return d.call(this, a, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  return a;
}();
cljs.core.map_indexed = function(a, b) {
  return function d(b, f) {
    return new cljs.core.LazySeq(null, function() {
      var g = cljs.core.seq.call(null, f);
      if (g) {
        if (cljs.core.chunked_seq_QMARK_.call(null, g)) {
          for (var h = cljs.core.chunk_first.call(null, g), k = cljs.core.count.call(null, h), l = cljs.core.chunk_buffer.call(null, k), m = 0;;) {
            if (m < k) {
              cljs.core.chunk_append.call(null, l, a.call(null, b + m, cljs.core._nth.call(null, h, m))), m += 1;
            } else {
              break;
            }
          }
          return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), d.call(null, b + k, cljs.core.chunk_rest.call(null, g)));
        }
        return cljs.core.cons.call(null, a.call(null, b, cljs.core.first.call(null, g)), d.call(null, b + 1, cljs.core.rest.call(null, g)));
      }
      return null;
    }, null, null);
  }.call(null, 0, b);
};
cljs.core.keep = function keep(b, c) {
  return new cljs.core.LazySeq(null, function() {
    var d = cljs.core.seq.call(null, c);
    if (d) {
      if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
        for (var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f), h = 0;;) {
          if (h < f) {
            var k = b.call(null, cljs.core._nth.call(null, e, h));
            null != k && cljs.core.chunk_append.call(null, g, k);
            h += 1;
          } else {
            break;
          }
        }
        return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), keep.call(null, b, cljs.core.chunk_rest.call(null, d)));
      }
      e = b.call(null, cljs.core.first.call(null, d));
      return null == e ? keep.call(null, b, cljs.core.rest.call(null, d)) : cljs.core.cons.call(null, e, keep.call(null, b, cljs.core.rest.call(null, d)));
    }
    return null;
  }, null, null);
};
cljs.core.keep_indexed = function(a, b) {
  return function d(b, f) {
    return new cljs.core.LazySeq(null, function() {
      var g = cljs.core.seq.call(null, f);
      if (g) {
        if (cljs.core.chunked_seq_QMARK_.call(null, g)) {
          for (var h = cljs.core.chunk_first.call(null, g), k = cljs.core.count.call(null, h), l = cljs.core.chunk_buffer.call(null, k), m = 0;;) {
            if (m < k) {
              var n = a.call(null, b + m, cljs.core._nth.call(null, h, m));
              null != n && cljs.core.chunk_append.call(null, l, n);
              m += 1;
            } else {
              break;
            }
          }
          return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), d.call(null, b + k, cljs.core.chunk_rest.call(null, g)));
        }
        h = a.call(null, b, cljs.core.first.call(null, g));
        return null == h ? d.call(null, b + 1, cljs.core.rest.call(null, g)) : cljs.core.cons.call(null, h, d.call(null, b + 1, cljs.core.rest.call(null, g)));
      }
      return null;
    }, null, null);
  }.call(null, 0, b);
};
cljs.core.every_pred = function() {
  var a = null, b = function(a) {
    return function() {
      var b = null, c = function(b) {
        return cljs.core.boolean$.call(null, a.call(null, b));
      }, d = function(b, c) {
        return cljs.core.boolean$.call(null, function() {
          var d = a.call(null, b);
          return cljs.core.truth_(d) ? a.call(null, c) : d;
        }());
      }, e = function(b, c, d) {
        return cljs.core.boolean$.call(null, function() {
          var e = a.call(null, b);
          return cljs.core.truth_(e) ? (e = a.call(null, c), cljs.core.truth_(e) ? a.call(null, d) : e) : e;
        }());
      }, m = function() {
        var c = function(c, d, e, h) {
          return cljs.core.boolean$.call(null, b.call(null, c, d, e) && cljs.core.every_QMARK_.call(null, a, h));
        }, d = function(a, b, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return c.call(this, a, b, d, f);
        };
        d.cljs$lang$maxFixedArity = 3;
        d.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return c(b, d, e, a);
        };
        d.cljs$core$IFn$_invoke$arity$variadic = c;
        return d;
      }(), b = function(a, b, f, g) {
        switch(arguments.length) {
          case 0:
            return!0;
          case 1:
            return c.call(this, a);
          case 2:
            return d.call(this, a, b);
          case 3:
            return e.call(this, a, b, f);
          default:
            return m.cljs$core$IFn$_invoke$arity$variadic(a, b, f, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      b.cljs$lang$maxFixedArity = 3;
      b.cljs$lang$applyTo = m.cljs$lang$applyTo;
      b.cljs$core$IFn$_invoke$arity$0 = function() {
        return!0;
      };
      b.cljs$core$IFn$_invoke$arity$1 = c;
      b.cljs$core$IFn$_invoke$arity$2 = d;
      b.cljs$core$IFn$_invoke$arity$3 = e;
      b.cljs$core$IFn$_invoke$arity$variadic = m.cljs$core$IFn$_invoke$arity$variadic;
      return b;
    }();
  }, c = function(a, b) {
    return function() {
      var c = null, d = function(c) {
        return cljs.core.boolean$.call(null, function() {
          var d = a.call(null, c);
          return cljs.core.truth_(d) ? b.call(null, c) : d;
        }());
      }, e = function(c, d) {
        return cljs.core.boolean$.call(null, function() {
          var e = a.call(null, c);
          return cljs.core.truth_(e) && (e = a.call(null, d), cljs.core.truth_(e)) ? (e = b.call(null, c), cljs.core.truth_(e) ? b.call(null, d) : e) : e;
        }());
      }, m = function(c, d, e) {
        return cljs.core.boolean$.call(null, function() {
          var h = a.call(null, c);
          return cljs.core.truth_(h) && (h = a.call(null, d), cljs.core.truth_(h) && (h = a.call(null, e), cljs.core.truth_(h) && (h = b.call(null, c), cljs.core.truth_(h)))) ? (h = b.call(null, d), cljs.core.truth_(h) ? b.call(null, e) : h) : h;
        }());
      }, n = function() {
        var d = function(d, e, k, l) {
          return cljs.core.boolean$.call(null, c.call(null, d, e, k) && cljs.core.every_QMARK_.call(null, function(c) {
            var d = a.call(null, c);
            return cljs.core.truth_(d) ? b.call(null, c) : d;
          }, l));
        }, e = function(a, b, c, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return d.call(this, a, b, c, f);
        };
        e.cljs$lang$maxFixedArity = 3;
        e.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return d(b, c, e, a);
        };
        e.cljs$core$IFn$_invoke$arity$variadic = d;
        return e;
      }(), c = function(a, b, c, f) {
        switch(arguments.length) {
          case 0:
            return!0;
          case 1:
            return d.call(this, a);
          case 2:
            return e.call(this, a, b);
          case 3:
            return m.call(this, a, b, c);
          default:
            return n.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      c.cljs$lang$maxFixedArity = 3;
      c.cljs$lang$applyTo = n.cljs$lang$applyTo;
      c.cljs$core$IFn$_invoke$arity$0 = function() {
        return!0;
      };
      c.cljs$core$IFn$_invoke$arity$1 = d;
      c.cljs$core$IFn$_invoke$arity$2 = e;
      c.cljs$core$IFn$_invoke$arity$3 = m;
      c.cljs$core$IFn$_invoke$arity$variadic = n.cljs$core$IFn$_invoke$arity$variadic;
      return c;
    }();
  }, d = function(a, b, c) {
    return function() {
      var d = null, e = function(d) {
        return cljs.core.boolean$.call(null, function() {
          var e = a.call(null, d);
          return cljs.core.truth_(e) ? (e = b.call(null, d), cljs.core.truth_(e) ? c.call(null, d) : e) : e;
        }());
      }, m = function(d, e) {
        return cljs.core.boolean$.call(null, function() {
          var k = a.call(null, d);
          return cljs.core.truth_(k) && (k = b.call(null, d), cljs.core.truth_(k) && (k = c.call(null, d), cljs.core.truth_(k) && (k = a.call(null, e), cljs.core.truth_(k)))) ? (k = b.call(null, e), cljs.core.truth_(k) ? c.call(null, e) : k) : k;
        }());
      }, n = function(d, e, k) {
        return cljs.core.boolean$.call(null, function() {
          var l = a.call(null, d);
          return cljs.core.truth_(l) && (l = b.call(null, d), cljs.core.truth_(l) && (l = c.call(null, d), cljs.core.truth_(l) && (l = a.call(null, e), cljs.core.truth_(l) && (l = b.call(null, e), cljs.core.truth_(l) && (l = c.call(null, e), cljs.core.truth_(l) && (l = a.call(null, k), cljs.core.truth_(l))))))) ? (l = b.call(null, k), cljs.core.truth_(l) ? c.call(null, k) : l) : l;
        }());
      }, p = function() {
        var e = function(e, l, m, n) {
          return cljs.core.boolean$.call(null, d.call(null, e, l, m) && cljs.core.every_QMARK_.call(null, function(d) {
            var e = a.call(null, d);
            return cljs.core.truth_(e) ? (e = b.call(null, d), cljs.core.truth_(e) ? c.call(null, d) : e) : e;
          }, n));
        }, l = function(a, b, c, d) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return e.call(this, a, b, c, f);
        };
        l.cljs$lang$maxFixedArity = 3;
        l.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.rest(a);
          return e(b, c, d, a);
        };
        l.cljs$core$IFn$_invoke$arity$variadic = e;
        return l;
      }(), d = function(a, b, c, d) {
        switch(arguments.length) {
          case 0:
            return!0;
          case 1:
            return e.call(this, a);
          case 2:
            return m.call(this, a, b);
          case 3:
            return n.call(this, a, b, c);
          default:
            return p.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      d.cljs$lang$maxFixedArity = 3;
      d.cljs$lang$applyTo = p.cljs$lang$applyTo;
      d.cljs$core$IFn$_invoke$arity$0 = function() {
        return!0;
      };
      d.cljs$core$IFn$_invoke$arity$1 = e;
      d.cljs$core$IFn$_invoke$arity$2 = m;
      d.cljs$core$IFn$_invoke$arity$3 = n;
      d.cljs$core$IFn$_invoke$arity$variadic = p.cljs$core$IFn$_invoke$arity$variadic;
      return d;
    }();
  }, e = function() {
    var a = function(a, b, c, d) {
      var e = cljs.core.list_STAR_.call(null, a, b, c, d);
      return function() {
        var a = null, b = function(a) {
          return cljs.core.every_QMARK_.call(null, function(b) {
            return b.call(null, a);
          }, e);
        }, c = function(a, b) {
          return cljs.core.every_QMARK_.call(null, function(c) {
            var d = c.call(null, a);
            return cljs.core.truth_(d) ? c.call(null, b) : d;
          }, e);
        }, d = function(a, b, c) {
          return cljs.core.every_QMARK_.call(null, function(d) {
            var e = d.call(null, a);
            return cljs.core.truth_(e) ? (e = d.call(null, b), cljs.core.truth_(e) ? d.call(null, c) : e) : e;
          }, e);
        }, f = function() {
          var b = function(b, c, d, f) {
            return cljs.core.boolean$.call(null, a.call(null, b, c, d) && cljs.core.every_QMARK_.call(null, function(a) {
              return cljs.core.every_QMARK_.call(null, a, f);
            }, e));
          }, c = function(a, c, d, e) {
            var f = null;
            3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
            return b.call(this, a, c, d, f);
          };
          c.cljs$lang$maxFixedArity = 3;
          c.cljs$lang$applyTo = function(a) {
            var c = cljs.core.first(a);
            a = cljs.core.next(a);
            var d = cljs.core.first(a);
            a = cljs.core.next(a);
            var e = cljs.core.first(a);
            a = cljs.core.rest(a);
            return b(c, d, e, a);
          };
          c.cljs$core$IFn$_invoke$arity$variadic = b;
          return c;
        }(), a = function(a, e, g, h) {
          switch(arguments.length) {
            case 0:
              return!0;
            case 1:
              return b.call(this, a);
            case 2:
              return c.call(this, a, e);
            case 3:
              return d.call(this, a, e, g);
            default:
              return f.cljs$core$IFn$_invoke$arity$variadic(a, e, g, cljs.core.array_seq(arguments, 3));
          }
          throw Error("Invalid arity: " + arguments.length);
        };
        a.cljs$lang$maxFixedArity = 3;
        a.cljs$lang$applyTo = f.cljs$lang$applyTo;
        a.cljs$core$IFn$_invoke$arity$0 = function() {
          return!0;
        };
        a.cljs$core$IFn$_invoke$arity$1 = b;
        a.cljs$core$IFn$_invoke$arity$2 = c;
        a.cljs$core$IFn$_invoke$arity$3 = d;
        a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
        return a;
      }();
    }, b = function(b, c, d, e) {
      var g = null;
      3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return a.call(this, b, c, d, g);
    };
    b.cljs$lang$maxFixedArity = 3;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, g);
      case 3:
        return d.call(this, a, g, h);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.some_fn = function() {
  var a = null, b = function(a) {
    return function() {
      var b = null, c = function(b) {
        return a.call(null, b);
      }, d = function(b, c) {
        var d = a.call(null, b);
        return cljs.core.truth_(d) ? d : a.call(null, c);
      }, e = function(b, c, d) {
        b = a.call(null, b);
        if (cljs.core.truth_(b)) {
          return b;
        }
        c = a.call(null, c);
        return cljs.core.truth_(c) ? c : a.call(null, d);
      }, m = function() {
        var c = function(c, d, e, h) {
          c = b.call(null, c, d, e);
          return cljs.core.truth_(c) ? c : cljs.core.some.call(null, a, h);
        }, d = function(a, b, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return c.call(this, a, b, d, f);
        };
        d.cljs$lang$maxFixedArity = 3;
        d.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return c(b, d, e, a);
        };
        d.cljs$core$IFn$_invoke$arity$variadic = c;
        return d;
      }(), b = function(a, b, f, g) {
        switch(arguments.length) {
          case 0:
            return null;
          case 1:
            return c.call(this, a);
          case 2:
            return d.call(this, a, b);
          case 3:
            return e.call(this, a, b, f);
          default:
            return m.cljs$core$IFn$_invoke$arity$variadic(a, b, f, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      b.cljs$lang$maxFixedArity = 3;
      b.cljs$lang$applyTo = m.cljs$lang$applyTo;
      b.cljs$core$IFn$_invoke$arity$0 = function() {
        return null;
      };
      b.cljs$core$IFn$_invoke$arity$1 = c;
      b.cljs$core$IFn$_invoke$arity$2 = d;
      b.cljs$core$IFn$_invoke$arity$3 = e;
      b.cljs$core$IFn$_invoke$arity$variadic = m.cljs$core$IFn$_invoke$arity$variadic;
      return b;
    }();
  }, c = function(a, b) {
    return function() {
      var c = null, d = function(c) {
        var d = a.call(null, c);
        return cljs.core.truth_(d) ? d : b.call(null, c);
      }, e = function(c, d) {
        var e = a.call(null, c);
        if (cljs.core.truth_(e)) {
          return e;
        }
        e = a.call(null, d);
        if (cljs.core.truth_(e)) {
          return e;
        }
        e = b.call(null, c);
        return cljs.core.truth_(e) ? e : b.call(null, d);
      }, m = function(c, d, e) {
        var h = a.call(null, c);
        if (cljs.core.truth_(h)) {
          return h;
        }
        h = a.call(null, d);
        if (cljs.core.truth_(h)) {
          return h;
        }
        h = a.call(null, e);
        if (cljs.core.truth_(h)) {
          return h;
        }
        c = b.call(null, c);
        if (cljs.core.truth_(c)) {
          return c;
        }
        d = b.call(null, d);
        return cljs.core.truth_(d) ? d : b.call(null, e);
      }, n = function() {
        var d = function(d, e, k, l) {
          d = c.call(null, d, e, k);
          return cljs.core.truth_(d) ? d : cljs.core.some.call(null, function(c) {
            var d = a.call(null, c);
            return cljs.core.truth_(d) ? d : b.call(null, c);
          }, l);
        }, e = function(a, b, c, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return d.call(this, a, b, c, f);
        };
        e.cljs$lang$maxFixedArity = 3;
        e.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return d(b, c, e, a);
        };
        e.cljs$core$IFn$_invoke$arity$variadic = d;
        return e;
      }(), c = function(a, b, c, f) {
        switch(arguments.length) {
          case 0:
            return null;
          case 1:
            return d.call(this, a);
          case 2:
            return e.call(this, a, b);
          case 3:
            return m.call(this, a, b, c);
          default:
            return n.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      c.cljs$lang$maxFixedArity = 3;
      c.cljs$lang$applyTo = n.cljs$lang$applyTo;
      c.cljs$core$IFn$_invoke$arity$0 = function() {
        return null;
      };
      c.cljs$core$IFn$_invoke$arity$1 = d;
      c.cljs$core$IFn$_invoke$arity$2 = e;
      c.cljs$core$IFn$_invoke$arity$3 = m;
      c.cljs$core$IFn$_invoke$arity$variadic = n.cljs$core$IFn$_invoke$arity$variadic;
      return c;
    }();
  }, d = function(a, b, c) {
    return function() {
      var d = null, e = function(d) {
        var e = a.call(null, d);
        if (cljs.core.truth_(e)) {
          return e;
        }
        e = b.call(null, d);
        return cljs.core.truth_(e) ? e : c.call(null, d);
      }, m = function(d, e) {
        var k = a.call(null, d);
        if (cljs.core.truth_(k)) {
          return k;
        }
        k = b.call(null, d);
        if (cljs.core.truth_(k)) {
          return k;
        }
        k = c.call(null, d);
        if (cljs.core.truth_(k)) {
          return k;
        }
        k = a.call(null, e);
        if (cljs.core.truth_(k)) {
          return k;
        }
        k = b.call(null, e);
        return cljs.core.truth_(k) ? k : c.call(null, e);
      }, n = function(d, e, k) {
        var l = a.call(null, d);
        if (cljs.core.truth_(l)) {
          return l;
        }
        l = b.call(null, d);
        if (cljs.core.truth_(l)) {
          return l;
        }
        d = c.call(null, d);
        if (cljs.core.truth_(d)) {
          return d;
        }
        d = a.call(null, e);
        if (cljs.core.truth_(d)) {
          return d;
        }
        d = b.call(null, e);
        if (cljs.core.truth_(d)) {
          return d;
        }
        e = c.call(null, e);
        if (cljs.core.truth_(e)) {
          return e;
        }
        e = a.call(null, k);
        if (cljs.core.truth_(e)) {
          return e;
        }
        e = b.call(null, k);
        return cljs.core.truth_(e) ? e : c.call(null, k);
      }, p = function() {
        var e = function(e, l, m, n) {
          e = d.call(null, e, l, m);
          return cljs.core.truth_(e) ? e : cljs.core.some.call(null, function(d) {
            var e = a.call(null, d);
            if (cljs.core.truth_(e)) {
              return e;
            }
            e = b.call(null, d);
            return cljs.core.truth_(e) ? e : c.call(null, d);
          }, n);
        }, l = function(a, b, c, d) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return e.call(this, a, b, c, f);
        };
        l.cljs$lang$maxFixedArity = 3;
        l.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.rest(a);
          return e(b, c, d, a);
        };
        l.cljs$core$IFn$_invoke$arity$variadic = e;
        return l;
      }(), d = function(a, b, c, d) {
        switch(arguments.length) {
          case 0:
            return null;
          case 1:
            return e.call(this, a);
          case 2:
            return m.call(this, a, b);
          case 3:
            return n.call(this, a, b, c);
          default:
            return p.cljs$core$IFn$_invoke$arity$variadic(a, b, c, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      d.cljs$lang$maxFixedArity = 3;
      d.cljs$lang$applyTo = p.cljs$lang$applyTo;
      d.cljs$core$IFn$_invoke$arity$0 = function() {
        return null;
      };
      d.cljs$core$IFn$_invoke$arity$1 = e;
      d.cljs$core$IFn$_invoke$arity$2 = m;
      d.cljs$core$IFn$_invoke$arity$3 = n;
      d.cljs$core$IFn$_invoke$arity$variadic = p.cljs$core$IFn$_invoke$arity$variadic;
      return d;
    }();
  }, e = function() {
    var a = function(a, b, c, d) {
      var e = cljs.core.list_STAR_.call(null, a, b, c, d);
      return function() {
        var a = null, b = function(a) {
          return cljs.core.some.call(null, function(b) {
            return b.call(null, a);
          }, e);
        }, c = function(a, b) {
          return cljs.core.some.call(null, function(c) {
            var d = c.call(null, a);
            return cljs.core.truth_(d) ? d : c.call(null, b);
          }, e);
        }, d = function(a, b, c) {
          return cljs.core.some.call(null, function(d) {
            var e = d.call(null, a);
            if (cljs.core.truth_(e)) {
              return e;
            }
            e = d.call(null, b);
            return cljs.core.truth_(e) ? e : d.call(null, c);
          }, e);
        }, f = function() {
          var b = function(b, c, d, f) {
            b = a.call(null, b, c, d);
            return cljs.core.truth_(b) ? b : cljs.core.some.call(null, function(a) {
              return cljs.core.some.call(null, a, f);
            }, e);
          }, c = function(a, c, d, e) {
            var f = null;
            3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
            return b.call(this, a, c, d, f);
          };
          c.cljs$lang$maxFixedArity = 3;
          c.cljs$lang$applyTo = function(a) {
            var c = cljs.core.first(a);
            a = cljs.core.next(a);
            var d = cljs.core.first(a);
            a = cljs.core.next(a);
            var e = cljs.core.first(a);
            a = cljs.core.rest(a);
            return b(c, d, e, a);
          };
          c.cljs$core$IFn$_invoke$arity$variadic = b;
          return c;
        }(), a = function(a, e, g, h) {
          switch(arguments.length) {
            case 0:
              return null;
            case 1:
              return b.call(this, a);
            case 2:
              return c.call(this, a, e);
            case 3:
              return d.call(this, a, e, g);
            default:
              return f.cljs$core$IFn$_invoke$arity$variadic(a, e, g, cljs.core.array_seq(arguments, 3));
          }
          throw Error("Invalid arity: " + arguments.length);
        };
        a.cljs$lang$maxFixedArity = 3;
        a.cljs$lang$applyTo = f.cljs$lang$applyTo;
        a.cljs$core$IFn$_invoke$arity$0 = function() {
          return null;
        };
        a.cljs$core$IFn$_invoke$arity$1 = b;
        a.cljs$core$IFn$_invoke$arity$2 = c;
        a.cljs$core$IFn$_invoke$arity$3 = d;
        a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
        return a;
      }();
    }, b = function(b, c, d, e) {
      var g = null;
      3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return a.call(this, b, c, d, g);
    };
    b.cljs$lang$maxFixedArity = 3;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, g);
      case 3:
        return d.call(this, a, g, h);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.map = function() {
  var a = null, b = function(b, c) {
    return new cljs.core.LazySeq(null, function() {
      var d = cljs.core.seq.call(null, c);
      if (d) {
        if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
          for (var e = cljs.core.chunk_first.call(null, d), l = cljs.core.count.call(null, e), m = cljs.core.chunk_buffer.call(null, l), n = 0;;) {
            if (n < l) {
              cljs.core.chunk_append.call(null, m, b.call(null, cljs.core._nth.call(null, e, n))), n += 1;
            } else {
              break;
            }
          }
          return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, m), a.call(null, b, cljs.core.chunk_rest.call(null, d)));
        }
        return cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, d)), a.call(null, b, cljs.core.rest.call(null, d)));
      }
      return null;
    }, null, null);
  }, c = function(b, c, d) {
    return new cljs.core.LazySeq(null, function() {
      var e = cljs.core.seq.call(null, c), l = cljs.core.seq.call(null, d);
      return e && l ? cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, e), cljs.core.first.call(null, l)), a.call(null, b, cljs.core.rest.call(null, e), cljs.core.rest.call(null, l))) : null;
    }, null, null);
  }, d = function(b, c, d, e) {
    return new cljs.core.LazySeq(null, function() {
      var l = cljs.core.seq.call(null, c), m = cljs.core.seq.call(null, d), n = cljs.core.seq.call(null, e);
      return l && m && n ? cljs.core.cons.call(null, b.call(null, cljs.core.first.call(null, l), cljs.core.first.call(null, m), cljs.core.first.call(null, n)), a.call(null, b, cljs.core.rest.call(null, l), cljs.core.rest.call(null, m), cljs.core.rest.call(null, n))) : null;
    }, null, null);
  }, e = function() {
    var b = function(b, c, d, e, f) {
      return a.call(null, function(a) {
        return cljs.core.apply.call(null, b, a);
      }, function q(b) {
        return new cljs.core.LazySeq(null, function() {
          var c = a.call(null, cljs.core.seq, b);
          return cljs.core.every_QMARK_.call(null, cljs.core.identity, c) ? cljs.core.cons.call(null, a.call(null, cljs.core.first, c), q.call(null, a.call(null, cljs.core.rest, c))) : null;
        }, null, null);
      }.call(null, cljs.core.conj.call(null, f, e, d, c)));
    }, c = function(a, c, d, e, g) {
      var p = null;
      4 < arguments.length && (p = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
      return b.call(this, a, c, d, e, p);
    };
    c.cljs$lang$maxFixedArity = 4;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.next(a);
      var g = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, d, e, g, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, g, h, k, l) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, g);
      case 3:
        return c.call(this, a, g, h);
      case 4:
        return d.call(this, a, g, h, k);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, k, cljs.core.array_seq(arguments, 4));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 4;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.take = function take(b, c) {
  return new cljs.core.LazySeq(null, function() {
    if (0 < b) {
      var d = cljs.core.seq.call(null, c);
      return d ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take.call(null, b - 1, cljs.core.rest.call(null, d))) : null;
    }
    return null;
  }, null, null);
};
cljs.core.drop = function(a, b) {
  var c = function(a, b) {
    for (;;) {
      var c = cljs.core.seq.call(null, b);
      if (0 < a && c) {
        var g = a - 1, c = cljs.core.rest.call(null, c);
        a = g;
        b = c;
      } else {
        return c;
      }
    }
  };
  return new cljs.core.LazySeq(null, function() {
    return c.call(null, a, b);
  }, null, null);
};
cljs.core.drop_last = function() {
  var a = null, b = function(b) {
    return a.call(null, 1, b);
  }, c = function(a, b) {
    return cljs.core.map.call(null, function(a, b) {
      return a;
    }, b, cljs.core.drop.call(null, a, b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.take_last = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = cljs.core.seq.call(null, cljs.core.drop.call(null, a, b));;) {
    if (d) {
      c = cljs.core.next.call(null, c), d = cljs.core.next.call(null, d);
    } else {
      return c;
    }
  }
};
cljs.core.drop_while = function(a, b) {
  var c = function(a, b) {
    for (;;) {
      var c = cljs.core.seq.call(null, b);
      if (cljs.core.truth_(function() {
        var b = c;
        return b ? a.call(null, cljs.core.first.call(null, c)) : b;
      }())) {
        var g = a, h = cljs.core.rest.call(null, c);
        a = g;
        b = h;
      } else {
        return c;
      }
    }
  };
  return new cljs.core.LazySeq(null, function() {
    return c.call(null, a, b);
  }, null, null);
};
cljs.core.cycle = function cycle(b) {
  return new cljs.core.LazySeq(null, function() {
    var c = cljs.core.seq.call(null, b);
    return c ? cljs.core.concat.call(null, c, cycle.call(null, c)) : null;
  }, null, null);
};
cljs.core.split_at = function(a, b) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take.call(null, a, b), cljs.core.drop.call(null, a, b)], null);
};
cljs.core.repeat = function() {
  var a = null, b = function(b) {
    return new cljs.core.LazySeq(null, function() {
      return cljs.core.cons.call(null, b, a.call(null, b));
    }, null, null);
  }, c = function(b, c) {
    return cljs.core.take.call(null, b, a.call(null, c));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.replicate = function(a, b) {
  return cljs.core.take.call(null, a, cljs.core.repeat.call(null, b));
};
cljs.core.repeatedly = function() {
  var a = null, b = function(b) {
    return new cljs.core.LazySeq(null, function() {
      return cljs.core.cons.call(null, b.call(null), a.call(null, b));
    }, null, null);
  }, c = function(b, c) {
    return cljs.core.take.call(null, b, a.call(null, c));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.iterate = function iterate(b, c) {
  return cljs.core.cons.call(null, c, new cljs.core.LazySeq(null, function() {
    return iterate.call(null, b, b.call(null, c));
  }, null, null));
};
cljs.core.interleave = function() {
  var a = null, b = function(b, c) {
    return new cljs.core.LazySeq(null, function() {
      var f = cljs.core.seq.call(null, b), g = cljs.core.seq.call(null, c);
      return f && g ? cljs.core.cons.call(null, cljs.core.first.call(null, f), cljs.core.cons.call(null, cljs.core.first.call(null, g), a.call(null, cljs.core.rest.call(null, f), cljs.core.rest.call(null, g)))) : null;
    }, null, null);
  }, c = function() {
    var b = function(b, c, d) {
      return new cljs.core.LazySeq(null, function() {
        var e = cljs.core.map.call(null, cljs.core.seq, cljs.core.conj.call(null, d, c, b));
        return cljs.core.every_QMARK_.call(null, cljs.core.identity, e) ? cljs.core.concat.call(null, cljs.core.map.call(null, cljs.core.first, e), cljs.core.apply.call(null, a, cljs.core.map.call(null, cljs.core.rest, e))) : null;
      }, null, null);
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.interpose = function(a, b) {
  return cljs.core.drop.call(null, 1, cljs.core.interleave.call(null, cljs.core.repeat.call(null, a), b));
};
cljs.core.flatten1 = function(a) {
  return function c(a, e) {
    return new cljs.core.LazySeq(null, function() {
      var f = cljs.core.seq.call(null, a);
      return f ? cljs.core.cons.call(null, cljs.core.first.call(null, f), c.call(null, cljs.core.rest.call(null, f), e)) : cljs.core.seq.call(null, e) ? c.call(null, cljs.core.first.call(null, e), cljs.core.rest.call(null, e)) : null;
    }, null, null);
  }.call(null, null, a);
};
cljs.core.mapcat = function() {
  var a = null, b = function(a, b) {
    return cljs.core.flatten1.call(null, cljs.core.map.call(null, a, b));
  }, c = function() {
    var a = function(a, b, c) {
      return cljs.core.flatten1.call(null, cljs.core.apply.call(null, cljs.core.map, a, b, c));
    }, b = function(b, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, c, k);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.filter = function filter(b, c) {
  return new cljs.core.LazySeq(null, function() {
    var d = cljs.core.seq.call(null, c);
    if (d) {
      if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
        for (var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f), h = 0;;) {
          if (h < f) {
            cljs.core.truth_(b.call(null, cljs.core._nth.call(null, e, h))) && cljs.core.chunk_append.call(null, g, cljs.core._nth.call(null, e, h)), h += 1;
          } else {
            break;
          }
        }
        return cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), filter.call(null, b, cljs.core.chunk_rest.call(null, d)));
      }
      e = cljs.core.first.call(null, d);
      d = cljs.core.rest.call(null, d);
      return cljs.core.truth_(b.call(null, e)) ? cljs.core.cons.call(null, e, filter.call(null, b, d)) : filter.call(null, b, d);
    }
    return null;
  }, null, null);
};
cljs.core.remove = function(a, b) {
  return cljs.core.filter.call(null, cljs.core.complement.call(null, a), b);
};
cljs.core.tree_seq = function(a, b, c) {
  return function e(c) {
    return new cljs.core.LazySeq(null, function() {
      return cljs.core.cons.call(null, c, cljs.core.truth_(a.call(null, c)) ? cljs.core.mapcat.call(null, e, b.call(null, c)) : null);
    }, null, null);
  }.call(null, c);
};
cljs.core.flatten = function(a) {
  return cljs.core.filter.call(null, function(a) {
    return!cljs.core.sequential_QMARK_.call(null, a);
  }, cljs.core.rest.call(null, cljs.core.tree_seq.call(null, cljs.core.sequential_QMARK_, cljs.core.seq, a)));
};
cljs.core.into = function(a, b) {
  return null != a ? a && (a.cljs$lang$protocol_mask$partition1$ & 4 || a.cljs$core$IEditableCollection$) ? cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core.transient$.call(null, a), b)) : cljs.core.reduce.call(null, cljs.core._conj, a, b) : cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, b);
};
cljs.core.mapv = function() {
  var a = null, b = function(a, b) {
    return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(b, c) {
      return cljs.core.conj_BANG_.call(null, b, a.call(null, c));
    }, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), b));
  }, c = function(a, b, c) {
    return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, a, b, c));
  }, d = function(a, b, c, d) {
    return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.map.call(null, a, b, c, d));
  }, e = function() {
    var a = function(a, b, c, d, e) {
      return cljs.core.into.call(null, cljs.core.PersistentVector.EMPTY, cljs.core.apply.call(null, cljs.core.map, a, b, c, d, e));
    }, b = function(b, c, d, e, g) {
      var p = null;
      4 < arguments.length && (p = cljs.core.array_seq(Array.prototype.slice.call(arguments, 4), 0));
      return a.call(this, b, c, d, e, p);
    };
    b.cljs$lang$maxFixedArity = 4;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var g = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, g, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k, l) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, g);
      case 3:
        return c.call(this, a, g, h);
      case 4:
        return d.call(this, a, g, h, k);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, k, cljs.core.array_seq(arguments, 4));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 4;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.filterv = function(a, b) {
  return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(b, d) {
    return cljs.core.truth_(a.call(null, d)) ? cljs.core.conj_BANG_.call(null, b, d) : b;
  }, cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY), b));
};
cljs.core.partition = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, b, c);
  }, c = function(b, c, d) {
    return new cljs.core.LazySeq(null, function() {
      var h = cljs.core.seq.call(null, d);
      if (h) {
        var k = cljs.core.take.call(null, b, h);
        return b === cljs.core.count.call(null, k) ? cljs.core.cons.call(null, k, a.call(null, b, c, cljs.core.drop.call(null, c, h))) : null;
      }
      return null;
    }, null, null);
  }, d = function(b, c, d, h) {
    return new cljs.core.LazySeq(null, function() {
      var k = cljs.core.seq.call(null, h);
      if (k) {
        var l = cljs.core.take.call(null, b, k);
        return b === cljs.core.count.call(null, l) ? cljs.core.cons.call(null, l, a.call(null, b, c, d, cljs.core.drop.call(null, c, k))) : cljs.core._conj.call(null, cljs.core.List.EMPTY, cljs.core.take.call(null, b, cljs.core.concat.call(null, l, d)));
      }
      return null;
    }, null, null);
  }, a = function(a, f, g, h) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, f);
      case 3:
        return c.call(this, a, f, g);
      case 4:
        return d.call(this, a, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  return a;
}();
cljs.core.get_in = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, c, null);
  }, c = function(a, b, c) {
    var g = cljs.core.lookup_sentinel;
    for (b = cljs.core.seq.call(null, b);;) {
      if (b) {
        var h = a;
        if (h ? h.cljs$lang$protocol_mask$partition0$ & 256 || h.cljs$core$ILookup$ || (h.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ILookup, h)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.ILookup, h)) {
          a = cljs.core.get.call(null, a, cljs.core.first.call(null, b), g);
          if (g === a) {
            return c;
          }
          b = cljs.core.next.call(null, b);
        } else {
          return c;
        }
      } else {
        return a;
      }
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.assoc_in = function assoc_in(b, c, d) {
  var e = cljs.core.nth.call(null, c, 0, null);
  return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, e, assoc_in.call(null, cljs.core.get.call(null, b, e), c, d)) : cljs.core.assoc.call(null, b, e, d);
};
cljs.core.update_in = function() {
  var a = null, b = function(b, c, d) {
    var e = cljs.core.nth.call(null, c, 0, null);
    return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, e, a.call(null, cljs.core.get.call(null, b, e), c, d)) : cljs.core.assoc.call(null, b, e, d.call(null, cljs.core.get.call(null, b, e)));
  }, c = function(b, c, d, e) {
    var f = cljs.core.nth.call(null, c, 0, null);
    return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, f, a.call(null, cljs.core.get.call(null, b, f), c, d, e)) : cljs.core.assoc.call(null, b, f, d.call(null, cljs.core.get.call(null, b, f), e));
  }, d = function(b, c, d, e, f) {
    var n = cljs.core.nth.call(null, c, 0, null);
    return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, n, a.call(null, cljs.core.get.call(null, b, n), c, d, e, f)) : cljs.core.assoc.call(null, b, n, d.call(null, cljs.core.get.call(null, b, n), e, f));
  }, e = function(b, c, d, e, f, n) {
    var p = cljs.core.nth.call(null, c, 0, null);
    return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, p, a.call(null, cljs.core.get.call(null, b, p), c, d, e, f, n)) : cljs.core.assoc.call(null, b, p, d.call(null, cljs.core.get.call(null, b, p), e, f, n));
  }, f = function() {
    var b = function(b, c, d, e, f, g, h) {
      var s = cljs.core.nth.call(null, c, 0, null);
      return(c = cljs.core.nthnext.call(null, c, 1)) ? cljs.core.assoc.call(null, b, s, cljs.core.apply.call(null, a, cljs.core.get.call(null, b, s), c, d, e, f, g, h)) : cljs.core.assoc.call(null, b, s, cljs.core.apply.call(null, d, cljs.core.get.call(null, b, s), e, f, g, h));
    }, c = function(a, c, d, e, f, h, r) {
      var s = null;
      6 < arguments.length && (s = cljs.core.array_seq(Array.prototype.slice.call(arguments, 6), 0));
      return b.call(this, a, c, d, e, f, h, s);
    };
    c.cljs$lang$maxFixedArity = 6;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var d = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.next(a);
      var f = cljs.core.first(a);
      a = cljs.core.next(a);
      var h = cljs.core.first(a);
      a = cljs.core.next(a);
      var r = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, d, e, f, h, r, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, h, k, l, m, n, p) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, h, k);
      case 4:
        return c.call(this, a, h, k, l);
      case 5:
        return d.call(this, a, h, k, l, m);
      case 6:
        return e.call(this, a, h, k, l, m, n);
      default:
        return f.cljs$core$IFn$_invoke$arity$variadic(a, h, k, l, m, n, cljs.core.array_seq(arguments, 6));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 6;
  a.cljs$lang$applyTo = f.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  a.cljs$core$IFn$_invoke$arity$5 = d;
  a.cljs$core$IFn$_invoke$arity$6 = e;
  a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.VectorNode = function(a, b) {
  this.edit = a;
  this.arr = b;
};
cljs.core.VectorNode.cljs$lang$type = !0;
cljs.core.VectorNode.cljs$lang$ctorStr = "cljs.core/VectorNode";
cljs.core.VectorNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/VectorNode");
};
cljs.core.__GT_VectorNode = function(a, b) {
  return new cljs.core.VectorNode(a, b);
};
cljs.core.pv_fresh_node = function(a) {
  return new cljs.core.VectorNode(a, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
};
cljs.core.pv_aget = function(a, b) {
  return a.arr[b];
};
cljs.core.pv_aset = function(a, b, c) {
  return a.arr[b] = c;
};
cljs.core.pv_clone_node = function(a) {
  return new cljs.core.VectorNode(a.edit, cljs.core.aclone.call(null, a.arr));
};
cljs.core.tail_off = function(a) {
  a = a.cnt;
  return 32 > a ? 0 : a - 1 >>> 5 << 5;
};
cljs.core.new_path = function(a, b, c) {
  for (;;) {
    if (0 === b) {
      return c;
    }
    var d = cljs.core.pv_fresh_node.call(null, a);
    cljs.core.pv_aset.call(null, d, 0, c);
    c = d;
    b -= 5;
  }
};
cljs.core.push_tail = function push_tail(b, c, d, e) {
  var f = cljs.core.pv_clone_node.call(null, d), g = b.cnt - 1 >>> c & 31;
  5 === c ? cljs.core.pv_aset.call(null, f, g, e) : (d = cljs.core.pv_aget.call(null, d, g), b = null != d ? push_tail.call(null, b, c - 5, d, e) : cljs.core.new_path.call(null, null, c - 5, e), cljs.core.pv_aset.call(null, f, g, b));
  return f;
};
cljs.core.vector_index_out_of_bounds = function(a, b) {
  throw Error([cljs.core.str("No item "), cljs.core.str(a), cljs.core.str(" in vector of length "), cljs.core.str(b)].join(""));
};
cljs.core.array_for = function(a, b) {
  if (0 <= b && b < a.cnt) {
    if (b >= cljs.core.tail_off.call(null, a)) {
      return a.tail;
    }
    for (var c = a.root, d = a.shift;;) {
      if (0 < d) {
        c = cljs.core.pv_aget.call(null, c, b >>> d & 31), d -= 5;
      } else {
        return c.arr;
      }
    }
  } else {
    return cljs.core.vector_index_out_of_bounds.call(null, b, a.cnt);
  }
};
cljs.core.do_assoc = function do_assoc(b, c, d, e, f) {
  var g = cljs.core.pv_clone_node.call(null, d);
  if (0 === c) {
    cljs.core.pv_aset.call(null, g, e & 31, f);
  } else {
    var h = e >>> c & 31;
    cljs.core.pv_aset.call(null, g, h, do_assoc.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, h), e, f));
  }
  return g;
};
cljs.core.pop_tail = function pop_tail(b, c, d) {
  var e = b.cnt - 2 >>> c & 31;
  if (5 < c) {
    b = pop_tail.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, e));
    if (null == b && 0 === e) {
      return null;
    }
    d = cljs.core.pv_clone_node.call(null, d);
    cljs.core.pv_aset.call(null, d, e, b);
    return d;
  }
  return 0 === e ? null : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (d = cljs.core.pv_clone_node.call(null, d), cljs.core.pv_aset.call(null, d, e, null), d) : null;
};
cljs.core.PersistentVector = function(a, b, c, d, e, f) {
  this.meta = a;
  this.cnt = b;
  this.shift = c;
  this.root = d;
  this.tail = e;
  this.__hash = f;
  this.cljs$lang$protocol_mask$partition1$ = 4;
  this.cljs$lang$protocol_mask$partition0$ = 167668511;
};
cljs.core.PersistentVector.cljs$lang$type = !0;
cljs.core.PersistentVector.cljs$lang$ctorStr = "cljs.core/PersistentVector";
cljs.core.PersistentVector.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentVector");
};
cljs.core.PersistentVector.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
  return new cljs.core.TransientVector(this.cnt, this.shift, cljs.core.tv_editable_root.call(null, this.root), cljs.core.tv_editable_tail.call(null, this.tail));
};
cljs.core.PersistentVector.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._nth.call(null, this, b, null);
};
cljs.core.PersistentVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._nth.call(null, this, b, c);
};
cljs.core.PersistentVector.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  if (0 <= b && b < this.cnt) {
    return cljs.core.tail_off.call(null, this) <= b ? (a = cljs.core.aclone.call(null, this.tail), a[b & 31] = c, new cljs.core.PersistentVector(this.meta, this.cnt, this.shift, this.root, a, null)) : new cljs.core.PersistentVector(this.meta, this.cnt, this.shift, cljs.core.do_assoc.call(null, this, this.shift, this.root, b, c), this.tail, null);
  }
  if (b === this.cnt) {
    return cljs.core._conj.call(null, this, c);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error([cljs.core.str("Index "), cljs.core.str(b), cljs.core.str(" out of bounds  [0,"), cljs.core.str(this.cnt), cljs.core.str("]")].join(""));
  }
  return null;
};
cljs.core.PersistentVector.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$IIndexed$_nth$arity$2(null, c);
      case 3:
        return this.cljs$core$IIndexed$_nth$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentVector.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$IIndexed$_nth$arity$2(null, a);
};
cljs.core.PersistentVector.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$IIndexed$_nth$arity$3(null, a, b);
};
cljs.core.PersistentVector.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
  a = [0, c];
  for (c = 0;;) {
    if (c < this.cnt) {
      var d = cljs.core.array_for.call(null, this, c), e = d.length;
      a: {
        for (var f = 0, g = a[1];;) {
          if (f < e) {
            if (g = b.call(null, g, f + c, d[f]), cljs.core.reduced_QMARK_.call(null, g)) {
              d = g;
              break a;
            } else {
              f += 1;
            }
          } else {
            a[0] = e;
            d = a[1] = g;
            break a;
          }
        }
        d = void 0;
      }
      if (cljs.core.reduced_QMARK_.call(null, d)) {
        return cljs.core.deref.call(null, d);
      }
      c += a[0];
    } else {
      return a[1];
    }
  }
};
cljs.core.PersistentVector.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  if (32 > this.cnt - cljs.core.tail_off.call(null, this)) {
    for (var c = this.tail.length, d = Array(c + 1), e = 0;;) {
      if (e < c) {
        d[e] = this.tail[e], e += 1;
      } else {
        break;
      }
    }
    d[c] = b;
    return new cljs.core.PersistentVector(this.meta, this.cnt + 1, this.shift, this.root, d, null);
  }
  c = (d = this.cnt >>> 5 > 1 << this.shift) ? this.shift + 5 : this.shift;
  d ? (d = cljs.core.pv_fresh_node.call(null, null), cljs.core.pv_aset.call(null, d, 0, this.root), cljs.core.pv_aset.call(null, d, 1, cljs.core.new_path.call(null, null, this.shift, new cljs.core.VectorNode(null, this.tail)))) : d = cljs.core.push_tail.call(null, this, this.shift, this.root, new cljs.core.VectorNode(null, this.tail));
  return new cljs.core.PersistentVector(this.meta, this.cnt + 1, c, d, [b], null);
};
cljs.core.PersistentVector.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
  return 0 < this.cnt ? new cljs.core.RSeq(this, this.cnt - 1, null) : null;
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_key$arity$1 = function(a) {
  return cljs.core._nth.call(null, this, 0);
};
cljs.core.PersistentVector.prototype.cljs$core$IMapEntry$_val$arity$1 = function(a) {
  return cljs.core._nth.call(null, this, 1);
};
cljs.core.PersistentVector.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, this, b);
};
cljs.core.PersistentVector.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, this, b, c);
};
cljs.core.PersistentVector.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return 0 === this.cnt ? null : 32 > this.cnt ? cljs.core.array_seq.call(null, this.tail) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.chunked_seq.call(null, this, 0, 0) : null;
};
cljs.core.PersistentVector.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.cnt;
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return 0 < this.cnt ? cljs.core._nth.call(null, this, this.cnt - 1) : null;
};
cljs.core.PersistentVector.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  if (0 === this.cnt) {
    throw Error("Can't pop empty vector");
  }
  if (1 === this.cnt) {
    return cljs.core._with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta);
  }
  if (1 < this.cnt - cljs.core.tail_off.call(null, this)) {
    return new cljs.core.PersistentVector(this.meta, this.cnt - 1, this.shift, this.root, this.tail.slice(0, -1), null);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    a = cljs.core.array_for.call(null, this, this.cnt - 2);
    var b = cljs.core.pop_tail.call(null, this, this.shift, this.root), b = null == b ? cljs.core.PersistentVector.EMPTY_NODE : b, c = this.cnt - 1;
    return 5 < this.shift && null == cljs.core.pv_aget.call(null, b, 1) ? new cljs.core.PersistentVector(this.meta, c, this.shift - 5, cljs.core.pv_aget.call(null, b, 0), a, null) : new cljs.core.PersistentVector(this.meta, c, this.shift, b, a, null);
  }
  return null;
};
cljs.core.PersistentVector.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
  return cljs.core._assoc.call(null, this, b, c);
};
cljs.core.PersistentVector.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.PersistentVector.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentVector(b, this.cnt, this.shift, this.root, this.tail, this.__hash);
};
cljs.core.PersistentVector.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentVector(this.meta, this.cnt, this.shift, this.root, this.tail, this.__hash);
};
cljs.core.PersistentVector.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  return cljs.core.array_for.call(null, this, b)[b & 31];
};
cljs.core.PersistentVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 <= b && b < this.cnt ? cljs.core._nth.call(null, this, b) : c;
};
cljs.core.PersistentVector.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta);
};
cljs.core.__GT_PersistentVector = function(a, b, c, d, e, f) {
  return new cljs.core.PersistentVector(a, b, c, d, e, f);
};
cljs.core.PersistentVector.EMPTY_NODE = new cljs.core.VectorNode(null, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
cljs.core.PersistentVector.EMPTY = new cljs.core.PersistentVector(null, 0, 5, cljs.core.PersistentVector.EMPTY_NODE, [], 0);
cljs.core.PersistentVector.fromArray = function(a, b) {
  var c = a.length, d = b ? a : cljs.core.aclone.call(null, a);
  if (32 > c) {
    return new cljs.core.PersistentVector(null, c, 5, cljs.core.PersistentVector.EMPTY_NODE, d, null);
  }
  for (var e = d.slice(0, 32), f = new cljs.core.PersistentVector(null, 32, 5, cljs.core.PersistentVector.EMPTY_NODE, e, null), e = 32, g = cljs.core._as_transient.call(null, f);;) {
    if (e < c) {
      f = e + 1, g = cljs.core.conj_BANG_.call(null, g, d[e]), e = f;
    } else {
      return cljs.core.persistent_BANG_.call(null, g);
    }
  }
};
cljs.core.vec = function(a) {
  return cljs.core._persistent_BANG_.call(null, cljs.core.reduce.call(null, cljs.core._conj_BANG_, cljs.core._as_transient.call(null, cljs.core.PersistentVector.EMPTY), a));
};
cljs.core.vector = function() {
  var a = function(a) {
    return a instanceof cljs.core.IndexedSeq && 0 === a.i ? cljs.core.PersistentVector.fromArray.call(null, a.arr, !0) : cljs.core.vec.call(null, a);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.ChunkedSeq = function(a, b, c, d, e, f) {
  this.vec = a;
  this.node = b;
  this.i = c;
  this.off = d;
  this.meta = e;
  this.__hash = f;
  this.cljs$lang$protocol_mask$partition0$ = 32243948;
  this.cljs$lang$protocol_mask$partition1$ = 1536;
};
cljs.core.ChunkedSeq.cljs$lang$type = !0;
cljs.core.ChunkedSeq.cljs$lang$ctorStr = "cljs.core/ChunkedSeq";
cljs.core.ChunkedSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ChunkedSeq");
};
cljs.core.ChunkedSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.ChunkedSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return this.off + 1 < this.node.length ? (a = cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off + 1), null == a ? null : a) : cljs.core._chunked_next.call(null, this);
};
cljs.core.ChunkedSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.ChunkedSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, cljs.core.subvec.call(null, this.vec, this.i + this.off, cljs.core.count.call(null, this.vec)), b);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, cljs.core.subvec.call(null, this.vec, this.i + this.off, cljs.core.count.call(null, this.vec)), b, c);
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return this.node[this.off];
};
cljs.core.ChunkedSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return this.off + 1 < this.node.length ? (a = cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off + 1), null == a ? cljs.core.List.EMPTY : a) : cljs.core._chunked_rest.call(null, this);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedNext$_chunked_next$arity$1 = function(a) {
  a = this.node.length;
  a = this.i + a < cljs.core._count.call(null, this.vec) ? cljs.core.chunked_seq.call(null, this.vec, this.i + a, 0) : null;
  return null == a ? null : a;
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return cljs.core.chunked_seq.call(null, this.vec, this.node, this.i, this.off, b);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IWithMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.ChunkedSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_first$arity$1 = function(a) {
  return cljs.core.array_chunk.call(null, this.node, this.off);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IChunkedSeq$_chunked_rest$arity$1 = function(a) {
  a = this.node.length;
  a = this.i + a < cljs.core._count.call(null, this.vec) ? cljs.core.chunked_seq.call(null, this.vec, this.i + a, 0) : null;
  return null == a ? cljs.core.List.EMPTY : a;
};
cljs.core.__GT_ChunkedSeq = function(a, b, c, d, e, f) {
  return new cljs.core.ChunkedSeq(a, b, c, d, e, f);
};
cljs.core.chunked_seq = function() {
  var a = null, b = function(a, b, c) {
    return new cljs.core.ChunkedSeq(a, cljs.core.array_for.call(null, a, b), b, c, null, null);
  }, c = function(a, b, c, d) {
    return new cljs.core.ChunkedSeq(a, b, c, d, null, null);
  }, d = function(a, b, c, d, k) {
    return new cljs.core.ChunkedSeq(a, b, c, d, k, null);
  }, a = function(a, f, g, h, k) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, f, g);
      case 4:
        return c.call(this, a, f, g, h);
      case 5:
        return d.call(this, a, f, g, h, k);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  a.cljs$core$IFn$_invoke$arity$5 = d;
  return a;
}();
cljs.core.Subvec = function(a, b, c, d, e) {
  this.meta = a;
  this.v = b;
  this.start = c;
  this.end = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32400159;
};
cljs.core.Subvec.cljs$lang$type = !0;
cljs.core.Subvec.cljs$lang$ctorStr = "cljs.core/Subvec";
cljs.core.Subvec.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Subvec");
};
cljs.core.Subvec.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._nth.call(null, this, b, null);
};
cljs.core.Subvec.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._nth.call(null, this, b, c);
};
cljs.core.Subvec.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  var d = this, e = d.start + b;
  return cljs.core.build_subvec.call(null, d.meta, cljs.core.assoc.call(null, d.v, e, c), d.start, function() {
    var a = d.end, b = e + 1;
    return a > b ? a : b;
  }(), null);
};
cljs.core.Subvec.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$IIndexed$_nth$arity$2(null, c);
      case 3:
        return this.cljs$core$IIndexed$_nth$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.Subvec.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$IIndexed$_nth$arity$2(null, a);
};
cljs.core.Subvec.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$IIndexed$_nth$arity$3(null, a, b);
};
cljs.core.Subvec.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.build_subvec.call(null, this.meta, cljs.core._assoc_n.call(null, this.v, this.end, b), this.start, this.end + 1, null);
};
cljs.core.Subvec.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, this, b);
};
cljs.core.Subvec.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, this, b, c);
};
cljs.core.Subvec.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  var b = this;
  return function d(a) {
    return a === b.end ? null : cljs.core.cons.call(null, cljs.core._nth.call(null, b.v, a), new cljs.core.LazySeq(null, function() {
      return d.call(null, a + 1);
    }, null, null));
  }.call(null, b.start);
};
cljs.core.Subvec.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.end - this.start;
};
cljs.core.Subvec.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return cljs.core._nth.call(null, this.v, this.end - 1);
};
cljs.core.Subvec.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  if (this.start === this.end) {
    throw Error("Can't pop empty vector");
  }
  return cljs.core.build_subvec.call(null, this.meta, this.v, this.start, this.end - 1, null);
};
cljs.core.Subvec.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
  return cljs.core._assoc.call(null, this, b, c);
};
cljs.core.Subvec.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.Subvec.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return cljs.core.build_subvec.call(null, b, this.v, this.start, this.end, this.__hash);
};
cljs.core.Subvec.prototype.cljs$core$ICloneable$ = !0;
cljs.core.Subvec.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.Subvec(this.meta, this.v, this.start, this.end, this.__hash);
};
cljs.core.Subvec.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  return 0 > b || this.end <= this.start + b ? cljs.core.vector_index_out_of_bounds.call(null, b, this.end - this.start) : cljs.core._nth.call(null, this.v, this.start + b);
};
cljs.core.Subvec.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 > b || this.end <= this.start + b ? c : cljs.core._nth.call(null, this.v, this.start + b, c);
};
cljs.core.Subvec.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentVector.EMPTY, this.meta);
};
cljs.core.__GT_Subvec = function(a, b, c, d, e) {
  return new cljs.core.Subvec(a, b, c, d, e);
};
cljs.core.build_subvec = function(a, b, c, d, e) {
  for (;;) {
    if (b instanceof cljs.core.Subvec) {
      c = b.start + c, d = b.start + d, b = b.v;
    } else {
      var f = cljs.core.count.call(null, b);
      if (0 > c || 0 > d || c > f || d > f) {
        throw Error("Index out of bounds");
      }
      return new cljs.core.Subvec(a, b, c, d, e);
    }
  }
};
cljs.core.subvec = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, c, cljs.core.count.call(null, b));
  }, c = function(a, b, c) {
    return cljs.core.build_subvec.call(null, null, a, b, c, null);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.tv_ensure_editable = function(a, b) {
  return a === b.edit ? b : new cljs.core.VectorNode(a, cljs.core.aclone.call(null, b.arr));
};
cljs.core.tv_editable_root = function(a) {
  return new cljs.core.VectorNode({}, cljs.core.aclone.call(null, a.arr));
};
cljs.core.tv_editable_tail = function(a) {
  var b = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
  cljs.core.array_copy.call(null, a, 0, b, 0, a.length);
  return b;
};
cljs.core.tv_push_tail = function tv_push_tail(b, c, d, e) {
  var f = cljs.core.tv_ensure_editable.call(null, b.root.edit, d), g = b.cnt - 1 >>> c & 31;
  cljs.core.pv_aset.call(null, f, g, 5 === c ? e : function() {
    var d = cljs.core.pv_aget.call(null, f, g);
    return null != d ? tv_push_tail.call(null, b, c - 5, d, e) : cljs.core.new_path.call(null, b.root.edit, c - 5, e);
  }());
  return f;
};
cljs.core.tv_pop_tail = function tv_pop_tail(b, c, d) {
  d = cljs.core.tv_ensure_editable.call(null, b.root.edit, d);
  var e = b.cnt - 2 >>> c & 31;
  if (5 < c) {
    b = tv_pop_tail.call(null, b, c - 5, cljs.core.pv_aget.call(null, d, e));
    if (null == b && 0 === e) {
      return null;
    }
    cljs.core.pv_aset.call(null, d, e, b);
    return d;
  }
  return 0 === e ? null : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (cljs.core.pv_aset.call(null, d, e, null), d) : null;
};
cljs.core.editable_array_for = function(a, b) {
  if (0 <= b && b < a.cnt) {
    if (b >= cljs.core.tail_off.call(null, a)) {
      return a.tail;
    }
    for (var c = a.root, d = c, e = a.shift;;) {
      if (0 < e) {
        d = cljs.core.tv_ensure_editable.call(null, c.edit, cljs.core.pv_aget.call(null, d, b >>> e & 31)), e -= 5;
      } else {
        return d.arr;
      }
    }
  } else {
    throw Error([cljs.core.str("No item "), cljs.core.str(b), cljs.core.str(" in transient vector of length "), cljs.core.str(a.cnt)].join(""));
  }
};
cljs.core.TransientVector = function(a, b, c, d) {
  this.cnt = a;
  this.shift = b;
  this.root = c;
  this.tail = d;
  this.cljs$lang$protocol_mask$partition0$ = 275;
  this.cljs$lang$protocol_mask$partition1$ = 88;
};
cljs.core.TransientVector.cljs$lang$type = !0;
cljs.core.TransientVector.cljs$lang$ctorStr = "cljs.core/TransientVector";
cljs.core.TransientVector.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/TransientVector");
};
cljs.core.TransientVector.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.TransientVector.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.TransientVector.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._nth.call(null, this, b, null);
};
cljs.core.TransientVector.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._nth.call(null, this, b, c);
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  if (this.root.edit) {
    return cljs.core.array_for.call(null, this, b)[b & 31];
  }
  throw Error("nth after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 <= b && b < this.cnt ? cljs.core._nth.call(null, this, b) : c;
};
cljs.core.TransientVector.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  if (this.root.edit) {
    return this.cnt;
  }
  throw Error("count after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_assoc_n_BANG_$arity$3 = function(a, b, c) {
  var d = this;
  if (d.root.edit) {
    if (0 <= b && b < d.cnt) {
      return cljs.core.tail_off.call(null, this) <= b ? d.tail[b & 31] = c : (a = function f(a, h) {
        var k = cljs.core.tv_ensure_editable.call(null, d.root.edit, h);
        if (0 === a) {
          cljs.core.pv_aset.call(null, k, b & 31, c);
        } else {
          var l = b >>> a & 31;
          cljs.core.pv_aset.call(null, k, l, f.call(null, a - 5, cljs.core.pv_aget.call(null, k, l)));
        }
        return k;
      }.call(null, d.shift, d.root), d.root = a), this;
    }
    if (b === d.cnt) {
      return cljs.core._conj_BANG_.call(null, this, c);
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      throw Error([cljs.core.str("Index "), cljs.core.str(b), cljs.core.str(" out of bounds for TransientVector of length"), cljs.core.str(d.cnt)].join(""));
    }
    return null;
  }
  throw Error("assoc! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientVector$_pop_BANG_$arity$1 = function(a) {
  if (this.root.edit) {
    if (0 === this.cnt) {
      throw Error("Can't pop empty vector");
    }
    if (1 === this.cnt) {
      return this.cnt = 0, this;
    }
    if (0 < (this.cnt - 1 & 31)) {
      return this.cnt -= 1, this;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      a = cljs.core.editable_array_for.call(null, this, this.cnt - 2);
      var b;
      b = cljs.core.tv_pop_tail.call(null, this, this.shift, this.root);
      b = null != b ? b : new cljs.core.VectorNode(this.root.edit, [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null]);
      5 < this.shift && null == cljs.core.pv_aget.call(null, b, 1) ? (this.root = cljs.core.tv_ensure_editable.call(null, this.root.edit, cljs.core.pv_aget.call(null, b, 0)), this.shift -= 5) : this.root = b;
      this.cnt -= 1;
      this.tail = a;
      return this;
    }
    return null;
  }
  throw Error("pop! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
  return cljs.core._assoc_n_BANG_.call(null, this, b, c);
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
  if (this.root.edit) {
    if (32 > this.cnt - cljs.core.tail_off.call(null, this)) {
      this.tail[this.cnt & 31] = b;
    } else {
      var c = new cljs.core.VectorNode(this.root.edit, this.tail), d = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
      d[0] = b;
      this.tail = d;
      if (this.cnt >>> 5 > 1 << this.shift) {
        var d = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null], e = this.shift + 5;
        d[0] = this.root;
        d[1] = cljs.core.new_path.call(null, this.root.edit, this.shift, c);
        this.root = new cljs.core.VectorNode(this.root.edit, d);
        this.shift = e;
      } else {
        this.root = cljs.core.tv_push_tail.call(null, this, this.shift, this.root, c);
      }
    }
    this.cnt += 1;
    return this;
  }
  throw Error("conj! after persistent!");
};
cljs.core.TransientVector.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
  if (this.root.edit) {
    this.root.edit = null;
    a = this.cnt - cljs.core.tail_off.call(null, this);
    var b = Array(a);
    cljs.core.array_copy.call(null, this.tail, 0, b, 0, a);
    return new cljs.core.PersistentVector(null, this.cnt, this.shift, this.root, b, null);
  }
  throw Error("persistent! called twice");
};
cljs.core.__GT_TransientVector = function(a, b, c, d) {
  return new cljs.core.TransientVector(a, b, c, d);
};
cljs.core.PersistentQueueSeq = function(a, b, c, d) {
  this.meta = a;
  this.front = b;
  this.rear = c;
  this.__hash = d;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 31850572;
};
cljs.core.PersistentQueueSeq.cljs$lang$type = !0;
cljs.core.PersistentQueueSeq.cljs$lang$ctorStr = "cljs.core/PersistentQueueSeq";
cljs.core.PersistentQueueSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentQueueSeq");
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.PersistentQueueSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core.first.call(null, this.front);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return(a = cljs.core.next.call(null, this.front)) ? new cljs.core.PersistentQueueSeq(this.meta, a, this.rear, null) : null == this.rear ? cljs.core._empty.call(null, this) : new cljs.core.PersistentQueueSeq(this.meta, this.rear, null, null);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentQueueSeq(b, this.front, this.rear, this.__hash);
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentQueueSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_PersistentQueueSeq = function(a, b, c, d) {
  return new cljs.core.PersistentQueueSeq(a, b, c, d);
};
cljs.core.PersistentQueue = function(a, b, c, d, e) {
  this.meta = a;
  this.count = b;
  this.front = c;
  this.rear = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 31858766;
};
cljs.core.PersistentQueue.cljs$lang$type = !0;
cljs.core.PersistentQueue.cljs$lang$ctorStr = "cljs.core/PersistentQueue";
cljs.core.PersistentQueue.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentQueue");
};
cljs.core.PersistentQueue.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.PersistentQueue.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  var c = this;
  return cljs.core.truth_(c.front) ? new cljs.core.PersistentQueue(c.meta, c.count + 1, c.front, cljs.core.conj.call(null, function() {
    var a = c.rear;
    return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY;
  }(), b), null) : new cljs.core.PersistentQueue(c.meta, c.count + 1, cljs.core.conj.call(null, c.front, b), cljs.core.PersistentVector.EMPTY, null);
};
cljs.core.PersistentQueue.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  var b = this, c = cljs.core.seq.call(null, b.rear);
  return cljs.core.truth_(function() {
    var a = b.front;
    return cljs.core.truth_(a) ? a : c;
  }()) ? new cljs.core.PersistentQueueSeq(null, b.front, cljs.core.seq.call(null, c), null) : null;
};
cljs.core.PersistentQueue.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.count;
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return cljs.core.first.call(null, this.front);
};
cljs.core.PersistentQueue.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  return cljs.core.truth_(this.front) ? (a = cljs.core.next.call(null, this.front)) ? new cljs.core.PersistentQueue(this.meta, this.count - 1, a, this.rear, null) : new cljs.core.PersistentQueue(this.meta, this.count - 1, cljs.core.seq.call(null, this.rear), cljs.core.PersistentVector.EMPTY, null) : this;
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core.first.call(null, this.front);
};
cljs.core.PersistentQueue.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return cljs.core.rest.call(null, cljs.core.seq.call(null, this));
};
cljs.core.PersistentQueue.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.PersistentQueue.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentQueue(b, this.count, this.front, this.rear, this.__hash);
};
cljs.core.PersistentQueue.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentQueue.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentQueue(this.meta, this.count, this.front, this.rear, this.__hash);
};
cljs.core.PersistentQueue.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentQueue.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.PersistentQueue.EMPTY;
};
cljs.core.__GT_PersistentQueue = function(a, b, c, d, e) {
  return new cljs.core.PersistentQueue(a, b, c, d, e);
};
cljs.core.PersistentQueue.EMPTY = new cljs.core.PersistentQueue(null, 0, null, cljs.core.PersistentVector.EMPTY, 0);
cljs.core.NeverEquiv = function() {
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 2097152;
};
cljs.core.NeverEquiv.cljs$lang$type = !0;
cljs.core.NeverEquiv.cljs$lang$ctorStr = "cljs.core/NeverEquiv";
cljs.core.NeverEquiv.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/NeverEquiv");
};
cljs.core.NeverEquiv.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return!1;
};
cljs.core.__GT_NeverEquiv = function() {
  return new cljs.core.NeverEquiv;
};
cljs.core.never_equiv = new cljs.core.NeverEquiv;
cljs.core.equiv_map = function(a, b) {
  return cljs.core.boolean$.call(null, cljs.core.map_QMARK_.call(null, b) ? cljs.core.count.call(null, a) === cljs.core.count.call(null, b) ? cljs.core.every_QMARK_.call(null, cljs.core.identity, cljs.core.map.call(null, function(a) {
    return cljs.core._EQ_.call(null, cljs.core.get.call(null, b, cljs.core.first.call(null, a), cljs.core.never_equiv), cljs.core.second.call(null, a));
  }, a)) : null : null);
};
cljs.core.scan_array = function(a, b, c) {
  for (var d = c.length, e = 0;;) {
    if (e < d) {
      if (b === c[e]) {
        return e;
      }
      e += a;
    } else {
      return null;
    }
  }
};
cljs.core.obj_map_compare_keys = function(a, b) {
  var c = cljs.core.hash.call(null, a), d = cljs.core.hash.call(null, b);
  return c < d ? -1 : c > d ? 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? 0 : null;
};
cljs.core.obj_map__GT_hash_map = function(a, b, c) {
  var d = a.keys, e = d.length, f = a.strobj;
  a = cljs.core.meta.call(null, a);
  for (var g = 0, h = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);;) {
    if (g < e) {
      var k = d[g], g = g + 1, h = cljs.core.assoc_BANG_.call(null, h, k, f[k])
    } else {
      return cljs.core.with_meta.call(null, cljs.core.persistent_BANG_.call(null, cljs.core.assoc_BANG_.call(null, h, b, c)), a);
    }
  }
};
cljs.core.obj_clone = function(a, b) {
  var c;
  c = {};
  for (var d = b.length, e = 0;;) {
    if (e < d) {
      var f = b[e];
      c[f] = a[f];
      e += 1;
    } else {
      break;
    }
  }
  return c;
};
cljs.core.ObjMap = function(a, b, c, d, e) {
  this.meta = a;
  this.keys = b;
  this.strobj = c;
  this.update_count = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 4;
  this.cljs$lang$protocol_mask$partition0$ = 16123663;
};
cljs.core.ObjMap.cljs$lang$type = !0;
cljs.core.ObjMap.cljs$lang$ctorStr = "cljs.core/ObjMap";
cljs.core.ObjMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ObjMap");
};
cljs.core.ObjMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
  return cljs.core.transient$.call(null, cljs.core.into.call(null, cljs.core.PersistentHashMap.EMPTY, this));
};
cljs.core.ObjMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_imap.call(null, this);
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.ObjMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return goog.isString(b) && null != cljs.core.scan_array.call(null, 1, b, this.keys) ? this.strobj[b] : c;
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  if (goog.isString(b)) {
    if (this.update_count > cljs.core.ObjMap.HASHMAP_THRESHOLD || this.keys.length >= cljs.core.ObjMap.HASHMAP_THRESHOLD) {
      return cljs.core.obj_map__GT_hash_map.call(null, this, b, c);
    }
    if (null != cljs.core.scan_array.call(null, 1, b, this.keys)) {
      return a = cljs.core.obj_clone.call(null, this.strobj, this.keys), a[b] = c, new cljs.core.ObjMap(this.meta, this.keys, a, this.update_count + 1, null);
    }
    a = cljs.core.obj_clone.call(null, this.strobj, this.keys);
    var d = cljs.core.aclone.call(null, this.keys);
    a[b] = c;
    d.push(b);
    return new cljs.core.ObjMap(this.meta, d, a, this.update_count + 1, null);
  }
  return cljs.core.obj_map__GT_hash_map.call(null, this, b, c);
};
cljs.core.ObjMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
  return goog.isString(b) && null != cljs.core.scan_array.call(null, 1, b, this.keys) ? !0 : !1;
};
cljs.core.ObjMap.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.ObjMap.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.ObjMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.ObjMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
  for (a = this.keys.sort(cljs.core.obj_map_compare_keys);;) {
    if (cljs.core.seq.call(null, a)) {
      var d = cljs.core.first.call(null, a);
      c = b.call(null, c, d, this.strobj[d]);
      if (cljs.core.reduced_QMARK_.call(null, c)) {
        return cljs.core.deref.call(null, c);
      }
      a = cljs.core.rest.call(null, a);
    } else {
      return c;
    }
  }
};
cljs.core.ObjMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.vector_QMARK_.call(null, b) ? cljs.core._assoc.call(null, this, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, this, b);
};
cljs.core.ObjMap.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.ObjMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  var b = this;
  return 0 < b.keys.length ? cljs.core.map.call(null, function(a) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b.strobj[a]], null);
  }, b.keys.sort(cljs.core.obj_map_compare_keys)) : null;
};
cljs.core.ObjMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.keys.length;
};
cljs.core.ObjMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_map.call(null, this, b);
};
cljs.core.ObjMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.ObjMap(b, this.keys, this.strobj, this.update_count, this.__hash);
};
cljs.core.ObjMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.ObjMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.ObjMap.EMPTY, this.meta);
};
cljs.core.ObjMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
  if (goog.isString(b) && null != cljs.core.scan_array.call(null, 1, b, this.keys)) {
    var c = cljs.core.aclone.call(null, this.keys), d = cljs.core.obj_clone.call(null, this.strobj, this.keys);
    c.splice(cljs.core.scan_array.call(null, 1, b, c), 1);
    delete d[b];
    return new cljs.core.ObjMap(this.meta, c, d, this.update_count + 1, null);
  }
  return this;
};
cljs.core.__GT_ObjMap = function(a, b, c, d, e) {
  return new cljs.core.ObjMap(a, b, c, d, e);
};
cljs.core.ObjMap.EMPTY = new cljs.core.ObjMap(null, [], function() {
  return{};
}(), 0, 0);
cljs.core.ObjMap.HASHMAP_THRESHOLD = 8;
cljs.core.ObjMap.fromObject = function(a, b) {
  return new cljs.core.ObjMap(null, a, b, 0, null);
};
cljs.core.array_map_index_of_nil_QMARK_ = function(a, b, c) {
  b = a.length;
  for (c = 0;;) {
    if (b <= c) {
      return-1;
    }
    if (null == a[c]) {
      return c;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      c += 2;
    } else {
      return null;
    }
  }
};
cljs.core.array_map_index_of_keyword_QMARK_ = function(a, b, c) {
  b = a.length;
  c = c.fqn;
  for (var d = 0;;) {
    if (b <= d) {
      return-1;
    }
    var e = a[d];
    if (e instanceof cljs.core.Keyword && c === e.fqn) {
      return d;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      d += 2;
    } else {
      return null;
    }
  }
};
cljs.core.array_map_index_of_symbol_QMARK_ = function(a, b, c) {
  b = a.length;
  c = c.str;
  for (var d = 0;;) {
    if (b <= d) {
      return-1;
    }
    var e = a[d];
    if (e instanceof cljs.core.Symbol && c === e.str) {
      return d;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      d += 2;
    } else {
      return null;
    }
  }
};
cljs.core.array_map_index_of_identical_QMARK_ = function(a, b, c) {
  b = a.length;
  for (var d = 0;;) {
    if (b <= d) {
      return-1;
    }
    if (c === a[d]) {
      return d;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      d += 2;
    } else {
      return null;
    }
  }
};
cljs.core.array_map_index_of_equiv_QMARK_ = function(a, b, c) {
  b = a.length;
  for (var d = 0;;) {
    if (b <= d) {
      return-1;
    }
    if (cljs.core._EQ_.call(null, c, a[d])) {
      return d;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      d += 2;
    } else {
      return null;
    }
  }
};
cljs.core.array_map_index_of = function(a, b) {
  var c = a.arr;
  return b instanceof cljs.core.Keyword ? cljs.core.array_map_index_of_keyword_QMARK_.call(null, c, a, b) : goog.isString(b) || "number" === typeof b ? cljs.core.array_map_index_of_identical_QMARK_.call(null, c, a, b) : b instanceof cljs.core.Symbol ? cljs.core.array_map_index_of_symbol_QMARK_.call(null, c, a, b) : null == b ? cljs.core.array_map_index_of_nil_QMARK_.call(null, c, a, b) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.array_map_index_of_equiv_QMARK_.call(null, 
  c, a, b) : null;
};
cljs.core.array_map_extend_kv = function(a, b, c) {
  a = a.arr;
  for (var d = a.length, e = Array(d + 2), f = 0;;) {
    if (f < d) {
      e[f] = a[f], f += 1;
    } else {
      break;
    }
  }
  e[d] = b;
  e[d + 1] = c;
  return e;
};
cljs.core.PersistentArrayMapSeq = function(a, b, c) {
  this.arr = a;
  this.i = b;
  this._meta = c;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374990;
};
cljs.core.PersistentArrayMapSeq.cljs$lang$type = !0;
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentArrayMapSeq";
cljs.core.PersistentArrayMapSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentArrayMapSeq");
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return cljs.core.hash_coll.call(null, this);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return this.i < this.arr.length - 2 ? new cljs.core.PersistentArrayMapSeq(this.arr, this.i + 2, this._meta) : null;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.PersistentArrayMapSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return(this.arr.length - this.i) / 2;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.arr[this.i], this.arr[this.i + 1]], null);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return this.i < this.arr.length - 2 ? new cljs.core.PersistentArrayMapSeq(this.arr, this.i + 2, this._meta) : cljs.core.List.EMPTY;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentArrayMapSeq(this.arr, this.i, b);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this._meta;
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this._meta);
};
cljs.core.__GT_PersistentArrayMapSeq = function(a, b, c) {
  return new cljs.core.PersistentArrayMapSeq(a, b, c);
};
cljs.core.persistent_array_map_seq = function(a, b, c) {
  return b <= a.length - 2 ? new cljs.core.PersistentArrayMapSeq(a, b, c) : null;
};
cljs.core.PersistentArrayMap = function(a, b, c, d) {
  this.meta = a;
  this.cnt = b;
  this.arr = c;
  this.__hash = d;
  this.cljs$lang$protocol_mask$partition1$ = 4;
  this.cljs$lang$protocol_mask$partition0$ = 16123663;
};
cljs.core.PersistentArrayMap.cljs$lang$type = !0;
cljs.core.PersistentArrayMap.cljs$lang$ctorStr = "cljs.core/PersistentArrayMap";
cljs.core.PersistentArrayMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentArrayMap");
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
  return new cljs.core.TransientArrayMap({}, this.arr.length, cljs.core.aclone.call(null, this.arr));
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_imap.call(null, this);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  a = cljs.core.array_map_index_of.call(null, this, b);
  return-1 === a ? c : this.arr[a + 1];
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  a = cljs.core.array_map_index_of.call(null, this, b);
  return-1 === a ? this.cnt < cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD ? (c = cljs.core.array_map_extend_kv.call(null, this, b, c), new cljs.core.PersistentArrayMap(this.meta, this.cnt + 1, c, null)) : cljs.core._with_meta.call(null, cljs.core._assoc.call(null, cljs.core.into.call(null, cljs.core.PersistentHashMap.EMPTY, this), b, c), this.meta) : c === this.arr[a + 1] ? this : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (b = cljs.core.aclone.call(null, this.arr), b[a + 1] = c, 
  new cljs.core.PersistentArrayMap(this.meta, this.cnt, b, null)) : null;
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
  return-1 !== cljs.core.array_map_index_of.call(null, this, b);
};
cljs.core.PersistentArrayMap.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentArrayMap.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
  a = this.arr.length;
  for (var d = 0;;) {
    if (d < a) {
      c = b.call(null, c, this.arr[d], this.arr[d + 1]);
      if (cljs.core.reduced_QMARK_.call(null, c)) {
        return cljs.core.deref.call(null, c);
      }
      d += 2;
    } else {
      return c;
    }
  }
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.vector_QMARK_.call(null, b) ? cljs.core._assoc.call(null, this, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, this, b);
};
cljs.core.PersistentArrayMap.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core.persistent_array_map_seq.call(null, this.arr, 0, null);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.cnt;
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_map.call(null, this, b);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentArrayMap(b, this.cnt, this.arr, this.__hash);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentArrayMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentArrayMap(this.meta, this.cnt, this.arr, this.__hash);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core._with_meta.call(null, cljs.core.PersistentArrayMap.EMPTY, this.meta);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
  if (0 <= cljs.core.array_map_index_of.call(null, this, b)) {
    var c = this.arr.length, d = c - 2;
    if (0 === d) {
      return cljs.core._empty.call(null, this);
    }
    for (var d = Array(d), e = 0, f = 0;;) {
      if (e >= c) {
        return new cljs.core.PersistentArrayMap(this.meta, this.cnt - 1, d, null);
      }
      if (cljs.core._EQ_.call(null, b, this.arr[e])) {
        e += 2;
      } else {
        if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
          d[f] = this.arr[e], d[f + 1] = this.arr[e + 1], f += 2, e += 2;
        } else {
          return null;
        }
      }
    }
  } else {
    return this;
  }
};
cljs.core.__GT_PersistentArrayMap = function(a, b, c, d) {
  return new cljs.core.PersistentArrayMap(a, b, c, d);
};
cljs.core.PersistentArrayMap.EMPTY = new cljs.core.PersistentArrayMap(null, 0, [], null);
cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD = 8;
cljs.core.PersistentArrayMap.fromArray = function(a, b, c) {
  a = b ? a : cljs.core.aclone.call(null, a);
  if (c) {
    return new cljs.core.PersistentArrayMap(null, a.length / 2, a, null);
  }
  c = a.length;
  b = 0;
  for (var d = cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY);;) {
    if (b < c) {
      var e = b + 2, d = cljs.core._assoc_BANG_.call(null, d, a[b], a[b + 1]);
      b = e;
    } else {
      return cljs.core._persistent_BANG_.call(null, d);
    }
  }
};
cljs.core.TransientArrayMap = function(a, b, c) {
  this.editable_QMARK_ = a;
  this.len = b;
  this.arr = c;
  this.cljs$lang$protocol_mask$partition1$ = 56;
  this.cljs$lang$protocol_mask$partition0$ = 258;
};
cljs.core.TransientArrayMap.cljs$lang$type = !0;
cljs.core.TransientArrayMap.cljs$lang$ctorStr = "cljs.core/TransientArrayMap";
cljs.core.TransientArrayMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/TransientArrayMap");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(a, b) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    var c = cljs.core.array_map_index_of.call(null, this, b);
    0 <= c && (this.arr[c] = this.arr[this.len - 2], this.arr[c + 1] = this.arr[this.len - 1], c = this.arr, c.pop(), c.pop(), this.len -= 2);
    return this;
  }
  throw Error("dissoc! after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    a = cljs.core.array_map_index_of.call(null, this, b);
    if (-1 === a) {
      return this.len + 2 <= 2 * cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD ? (this.len += 2, this.arr.push(b), this.arr.push(c), this) : cljs.core.assoc_BANG_.call(null, cljs.core.array__GT_transient_hash_map.call(null, this.len, this.arr), b, c);
    }
    c !== this.arr[a + 1] && (this.arr[a + 1] = c);
    return this;
  }
  throw Error("assoc! after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    if (b ? b.cljs$lang$protocol_mask$partition0$ & 2048 || b.cljs$core$IMapEntry$ || (b.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMapEntry, b)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMapEntry, b)) {
      return cljs.core._assoc_BANG_.call(null, this, cljs.core.key.call(null, b), cljs.core.val.call(null, b));
    }
    for (var c = cljs.core.seq.call(null, b), d = this;;) {
      var e = cljs.core.first.call(null, c);
      if (cljs.core.truth_(e)) {
        c = cljs.core.next.call(null, c), d = cljs.core._assoc_BANG_.call(null, d, cljs.core.key.call(null, e), cljs.core.val.call(null, e));
      } else {
        return d;
      }
    }
  } else {
    throw Error("conj! after persistent!");
  }
};
cljs.core.TransientArrayMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    return this.editable_QMARK_ = !1, new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, this.len, 2), this.arr, null);
  }
  throw Error("persistent! called twice");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.TransientArrayMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    return a = cljs.core.array_map_index_of.call(null, this, b), -1 === a ? c : this.arr[a + 1];
  }
  throw Error("lookup after persistent!");
};
cljs.core.TransientArrayMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  if (cljs.core.truth_(this.editable_QMARK_)) {
    return cljs.core.quot.call(null, this.len, 2);
  }
  throw Error("count after persistent!");
};
cljs.core.__GT_TransientArrayMap = function(a, b, c) {
  return new cljs.core.TransientArrayMap(a, b, c);
};
cljs.core.array__GT_transient_hash_map = function(a, b) {
  for (var c = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY), d = 0;;) {
    if (d < a) {
      c = cljs.core.assoc_BANG_.call(null, c, b[d], b[d + 1]), d += 2;
    } else {
      return c;
    }
  }
};
cljs.core.Box = function(a) {
  this.val = a;
};
cljs.core.Box.cljs$lang$type = !0;
cljs.core.Box.cljs$lang$ctorStr = "cljs.core/Box";
cljs.core.Box.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Box");
};
cljs.core.__GT_Box = function(a) {
  return new cljs.core.Box(a);
};
cljs.core.key_test = function(a, b) {
  return a === b ? !0 : cljs.core.keyword_identical_QMARK_.call(null, a, b) ? !0 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core._EQ_.call(null, a, b) : null;
};
cljs.core.mask = function(a, b) {
  return a >>> b & 31;
};
cljs.core.clone_and_set = function() {
  var a = null, b = function(a, b, c) {
    a = cljs.core.aclone.call(null, a);
    a[b] = c;
    return a;
  }, c = function(a, b, c, g, h) {
    a = cljs.core.aclone.call(null, a);
    a[b] = c;
    a[g] = h;
    return a;
  }, a = function(a, e, f, g, h) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 5:
        return c.call(this, a, e, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$5 = c;
  return a;
}();
cljs.core.remove_pair = function(a, b) {
  var c = Array(a.length - 2);
  cljs.core.array_copy.call(null, a, 0, c, 0, 2 * b);
  cljs.core.array_copy.call(null, a, 2 * (b + 1), c, 2 * b, c.length - 2 * b);
  return c;
};
cljs.core.bitmap_indexed_node_index = function(a, b) {
  return cljs.core.bit_count.call(null, a & b - 1);
};
cljs.core.bitpos = function(a, b) {
  return 1 << (a >>> b & 31);
};
cljs.core.edit_and_set = function() {
  var a = null, b = function(a, b, c, g) {
    a = a.ensure_editable(b);
    a.arr[c] = g;
    return a;
  }, c = function(a, b, c, g, h, k) {
    a = a.ensure_editable(b);
    a.arr[c] = g;
    a.arr[h] = k;
    return a;
  }, a = function(a, e, f, g, h, k) {
    switch(arguments.length) {
      case 4:
        return b.call(this, a, e, f, g);
      case 6:
        return c.call(this, a, e, f, g, h, k);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$4 = b;
  a.cljs$core$IFn$_invoke$arity$6 = c;
  return a;
}();
cljs.core.inode_kv_reduce = function(a, b, c) {
  for (var d = a.length, e = 0;;) {
    if (e < d) {
      var f = a[e];
      null != f ? c = b.call(null, c, f, a[e + 1]) : (f = a[e + 1], c = null != f ? f.kv_reduce(b, c) : c);
      if (cljs.core.reduced_QMARK_.call(null, c)) {
        return cljs.core.deref.call(null, c);
      }
      e += 2;
    } else {
      return c;
    }
  }
};
cljs.core.BitmapIndexedNode = function(a, b, c) {
  this.edit = a;
  this.bitmap = b;
  this.arr = c;
};
cljs.core.BitmapIndexedNode.cljs$lang$type = !0;
cljs.core.BitmapIndexedNode.cljs$lang$ctorStr = "cljs.core/BitmapIndexedNode";
cljs.core.BitmapIndexedNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/BitmapIndexedNode");
};
cljs.core.BitmapIndexedNode.prototype.edit_and_remove_pair = function(a, b, c) {
  if (this.bitmap === b) {
    return null;
  }
  a = this.ensure_editable(a);
  var d = a.arr, e = d.length;
  a.bitmap ^= b;
  cljs.core.array_copy.call(null, d, 2 * (c + 1), d, 2 * c, e - 2 * (c + 1));
  d[e - 2] = null;
  d[e - 1] = null;
  return a;
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
  var g = 1 << (c >>> b & 31), h = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, g);
  if (0 === (this.bitmap & g)) {
    var k = cljs.core.bit_count.call(null, this.bitmap);
    if (2 * k < this.arr.length) {
      return a = this.ensure_editable(a), b = a.arr, f.val = !0, cljs.core.array_copy_downward.call(null, b, 2 * h, b, 2 * (h + 1), 2 * (k - h)), b[2 * h] = d, b[2 * h + 1] = e, a.bitmap |= g, a;
    }
    if (16 <= k) {
      h = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
      h[c >>> b & 31] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, c, d, e, f);
      for (e = d = 0;;) {
        if (32 > d) {
          0 !== (this.bitmap >>> d & 1) && (h[d] = null != this.arr[e] ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, cljs.core.hash.call(null, this.arr[e]), this.arr[e], this.arr[e + 1], f) : this.arr[e + 1], e += 2), d += 1;
        } else {
          break;
        }
      }
      return new cljs.core.ArrayNode(a, k + 1, h);
    }
    return new cljs.core.Keyword(null, "else", "else", 1017020587) ? (b = Array(2 * (k + 4)), cljs.core.array_copy.call(null, this.arr, 0, b, 0, 2 * h), b[2 * h] = d, b[2 * h + 1] = e, cljs.core.array_copy.call(null, this.arr, 2 * h, b, 2 * (h + 1), 2 * (k - h)), f.val = !0, a = this.ensure_editable(a), a.arr = b, a.bitmap |= g, a) : null;
  }
  k = this.arr[2 * h];
  g = this.arr[2 * h + 1];
  return null == k ? (k = g.inode_assoc_BANG_(a, b + 5, c, d, e, f), k === g ? this : cljs.core.edit_and_set.call(null, this, a, 2 * h + 1, k)) : cljs.core.key_test.call(null, d, k) ? e === g ? this : cljs.core.edit_and_set.call(null, this, a, 2 * h + 1, e) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (f.val = !0, cljs.core.edit_and_set.call(null, this, a, 2 * h, null, 2 * h + 1, cljs.core.create_node.call(null, a, b + 5, k, g, c, d, e))) : null;
};
cljs.core.BitmapIndexedNode.prototype.inode_seq = function() {
  return cljs.core.create_inode_seq.call(null, this.arr);
};
cljs.core.BitmapIndexedNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
  var f = 1 << (c >>> b & 31);
  if (0 === (this.bitmap & f)) {
    return this;
  }
  var g = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, f), h = this.arr[2 * g], k = this.arr[2 * g + 1];
  return null == h ? (b = k.inode_without_BANG_(a, b + 5, c, d, e), b === k ? this : null != b ? cljs.core.edit_and_set.call(null, this, a, 2 * g + 1, b) : this.bitmap === f ? null : new cljs.core.Keyword(null, "else", "else", 1017020587) ? this.edit_and_remove_pair(a, f, g) : null) : cljs.core.key_test.call(null, d, h) ? (e[0] = !0, this.edit_and_remove_pair(a, f, g)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? this : null;
};
cljs.core.BitmapIndexedNode.prototype.ensure_editable = function(a) {
  if (a === this.edit) {
    return this;
  }
  var b = cljs.core.bit_count.call(null, this.bitmap), c = Array(0 > b ? 4 : 2 * (b + 1));
  cljs.core.array_copy.call(null, this.arr, 0, c, 0, 2 * b);
  return new cljs.core.BitmapIndexedNode(a, this.bitmap, c);
};
cljs.core.BitmapIndexedNode.prototype.kv_reduce = function(a, b) {
  return cljs.core.inode_kv_reduce.call(null, this.arr, a, b);
};
cljs.core.BitmapIndexedNode.prototype.inode_find = function(a, b, c, d) {
  var e = 1 << (b >>> a & 31);
  if (0 === (this.bitmap & e)) {
    return d;
  }
  var f = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, e), e = this.arr[2 * f], f = this.arr[2 * f + 1];
  return null == e ? f.inode_find(a + 5, b, c, d) : cljs.core.key_test.call(null, c, e) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, f], null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? d : null;
};
cljs.core.BitmapIndexedNode.prototype.inode_without = function(a, b, c) {
  var d = 1 << (b >>> a & 31);
  if (0 === (this.bitmap & d)) {
    return this;
  }
  var e = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, d), f = this.arr[2 * e], g = this.arr[2 * e + 1];
  return null == f ? (a = g.inode_without(a + 5, b, c), a === g ? this : null != a ? new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * e + 1, a)) : this.bitmap === d ? null : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.BitmapIndexedNode(null, this.bitmap ^ d, cljs.core.remove_pair.call(null, this.arr, e)) : null) : cljs.core.key_test.call(null, c, f) ? new cljs.core.BitmapIndexedNode(null, this.bitmap ^ d, cljs.core.remove_pair.call(null, 
  this.arr, e)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? this : null;
};
cljs.core.BitmapIndexedNode.prototype.inode_assoc = function(a, b, c, d, e) {
  var f = 1 << (b >>> a & 31), g = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, f);
  if (0 === (this.bitmap & f)) {
    var h = cljs.core.bit_count.call(null, this.bitmap);
    if (16 <= h) {
      g = [null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null];
      g[b >>> a & 31] = cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, b, c, d, e);
      for (d = c = 0;;) {
        if (32 > c) {
          0 !== (this.bitmap >>> c & 1) && (g[c] = null != this.arr[d] ? cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, cljs.core.hash.call(null, this.arr[d]), this.arr[d], this.arr[d + 1], e) : this.arr[d + 1], d += 2), c += 1;
        } else {
          break;
        }
      }
      return new cljs.core.ArrayNode(null, h + 1, g);
    }
    a = Array(2 * (h + 1));
    cljs.core.array_copy.call(null, this.arr, 0, a, 0, 2 * g);
    a[2 * g] = c;
    a[2 * g + 1] = d;
    cljs.core.array_copy.call(null, this.arr, 2 * g, a, 2 * (g + 1), 2 * (h - g));
    e.val = !0;
    return new cljs.core.BitmapIndexedNode(null, this.bitmap | f, a);
  }
  h = this.arr[2 * g];
  f = this.arr[2 * g + 1];
  return null == h ? (h = f.inode_assoc(a + 5, b, c, d, e), h === f ? this : new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * g + 1, h))) : cljs.core.key_test.call(null, c, h) ? d === f ? this : new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, this.arr, 2 * g + 1, d)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (e.val = !0, new cljs.core.BitmapIndexedNode(null, this.bitmap, cljs.core.clone_and_set.call(null, 
  this.arr, 2 * g, null, 2 * g + 1, cljs.core.create_node.call(null, a + 5, h, f, b, c, d)))) : null;
};
cljs.core.BitmapIndexedNode.prototype.inode_lookup = function(a, b, c, d) {
  var e = 1 << (b >>> a & 31);
  if (0 === (this.bitmap & e)) {
    return d;
  }
  var f = cljs.core.bitmap_indexed_node_index.call(null, this.bitmap, e), e = this.arr[2 * f], f = this.arr[2 * f + 1];
  return null == e ? f.inode_lookup(a + 5, b, c, d) : cljs.core.key_test.call(null, c, e) ? f : new cljs.core.Keyword(null, "else", "else", 1017020587) ? d : null;
};
cljs.core.__GT_BitmapIndexedNode = function(a, b, c) {
  return new cljs.core.BitmapIndexedNode(a, b, c);
};
cljs.core.BitmapIndexedNode.EMPTY = new cljs.core.BitmapIndexedNode(null, 0, []);
cljs.core.pack_array_node = function(a, b, c) {
  var d = a.arr;
  a = 2 * (a.cnt - 1);
  for (var e = Array(a), f = 0, g = 1, h = 0;;) {
    if (f < a) {
      f !== c && null != d[f] && (e[g] = d[f], g += 2, h |= 1 << f), f += 1;
    } else {
      return new cljs.core.BitmapIndexedNode(b, h, e);
    }
  }
};
cljs.core.ArrayNode = function(a, b, c) {
  this.edit = a;
  this.cnt = b;
  this.arr = c;
};
cljs.core.ArrayNode.cljs$lang$type = !0;
cljs.core.ArrayNode.cljs$lang$ctorStr = "cljs.core/ArrayNode";
cljs.core.ArrayNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ArrayNode");
};
cljs.core.ArrayNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
  var g = c >>> b & 31, h = this.arr[g];
  if (null == h) {
    return a = cljs.core.edit_and_set.call(null, this, a, g, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b + 5, c, d, e, f)), a.cnt += 1, a;
  }
  b = h.inode_assoc_BANG_(a, b + 5, c, d, e, f);
  return b === h ? this : cljs.core.edit_and_set.call(null, this, a, g, b);
};
cljs.core.ArrayNode.prototype.inode_seq = function() {
  return cljs.core.create_array_node_seq.call(null, this.arr);
};
cljs.core.ArrayNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
  var f = c >>> b & 31, g = this.arr[f];
  if (null == g) {
    return this;
  }
  b = g.inode_without_BANG_(a, b + 5, c, d, e);
  if (b === g) {
    return this;
  }
  if (null == b) {
    if (8 >= this.cnt) {
      return cljs.core.pack_array_node.call(null, this, a, f);
    }
    a = cljs.core.edit_and_set.call(null, this, a, f, b);
    a.cnt -= 1;
    return a;
  }
  return new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.edit_and_set.call(null, this, a, f, b) : null;
};
cljs.core.ArrayNode.prototype.ensure_editable = function(a) {
  return a === this.edit ? this : new cljs.core.ArrayNode(a, this.cnt, cljs.core.aclone.call(null, this.arr));
};
cljs.core.ArrayNode.prototype.kv_reduce = function(a, b) {
  for (var c = this.arr.length, d = 0, e = b;;) {
    if (d < c) {
      var f = this.arr[d];
      if (null != f && (e = f.kv_reduce(a, e), cljs.core.reduced_QMARK_.call(null, e))) {
        return cljs.core.deref.call(null, e);
      }
      d += 1;
    } else {
      return e;
    }
  }
};
cljs.core.ArrayNode.prototype.inode_find = function(a, b, c, d) {
  var e = this.arr[b >>> a & 31];
  return null != e ? e.inode_find(a + 5, b, c, d) : d;
};
cljs.core.ArrayNode.prototype.inode_without = function(a, b, c) {
  var d = b >>> a & 31, e = this.arr[d];
  return null != e ? (a = e.inode_without(a + 5, b, c), a === e ? this : null == a ? 8 >= this.cnt ? cljs.core.pack_array_node.call(null, this, null, d) : new cljs.core.ArrayNode(null, this.cnt - 1, cljs.core.clone_and_set.call(null, this.arr, d, a)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.ArrayNode(null, this.cnt, cljs.core.clone_and_set.call(null, this.arr, d, a)) : null) : this;
};
cljs.core.ArrayNode.prototype.inode_assoc = function(a, b, c, d, e) {
  var f = b >>> a & 31, g = this.arr[f];
  if (null == g) {
    return new cljs.core.ArrayNode(null, this.cnt + 1, cljs.core.clone_and_set.call(null, this.arr, f, cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a + 5, b, c, d, e)));
  }
  a = g.inode_assoc(a + 5, b, c, d, e);
  return a === g ? this : new cljs.core.ArrayNode(null, this.cnt, cljs.core.clone_and_set.call(null, this.arr, f, a));
};
cljs.core.ArrayNode.prototype.inode_lookup = function(a, b, c, d) {
  var e = this.arr[b >>> a & 31];
  return null != e ? e.inode_lookup(a + 5, b, c, d) : d;
};
cljs.core.__GT_ArrayNode = function(a, b, c) {
  return new cljs.core.ArrayNode(a, b, c);
};
cljs.core.hash_collision_node_find_index = function(a, b, c) {
  b *= 2;
  for (var d = 0;;) {
    if (d < b) {
      if (cljs.core.key_test.call(null, c, a[d])) {
        return d;
      }
      d += 2;
    } else {
      return-1;
    }
  }
};
cljs.core.HashCollisionNode = function(a, b, c, d) {
  this.edit = a;
  this.collision_hash = b;
  this.cnt = c;
  this.arr = d;
};
cljs.core.HashCollisionNode.cljs$lang$type = !0;
cljs.core.HashCollisionNode.cljs$lang$ctorStr = "cljs.core/HashCollisionNode";
cljs.core.HashCollisionNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/HashCollisionNode");
};
cljs.core.HashCollisionNode.prototype.inode_assoc_BANG_ = function(a, b, c, d, e, f) {
  if (c === this.collision_hash) {
    b = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, d);
    if (-1 === b) {
      if (this.arr.length > 2 * this.cnt) {
        return a = cljs.core.edit_and_set.call(null, this, a, 2 * this.cnt, d, 2 * this.cnt + 1, e), f.val = !0, a.cnt += 1, a;
      }
      b = this.arr.length;
      c = Array(b + 2);
      cljs.core.array_copy.call(null, this.arr, 0, c, 0, b);
      c[b] = d;
      c[b + 1] = e;
      f.val = !0;
      return this.ensure_editable_array(a, this.cnt + 1, c);
    }
    return this.arr[b + 1] === e ? this : cljs.core.edit_and_set.call(null, this, a, b + 1, e);
  }
  return(new cljs.core.BitmapIndexedNode(a, 1 << (this.collision_hash >>> b & 31), [null, this, null, null])).inode_assoc_BANG_(a, b, c, d, e, f);
};
cljs.core.HashCollisionNode.prototype.inode_seq = function() {
  return cljs.core.create_inode_seq.call(null, this.arr);
};
cljs.core.HashCollisionNode.prototype.inode_without_BANG_ = function(a, b, c, d, e) {
  b = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, d);
  if (-1 === b) {
    return this;
  }
  e[0] = !0;
  if (1 === this.cnt) {
    return null;
  }
  a = this.ensure_editable(a);
  e = a.arr;
  e[b] = e[2 * this.cnt - 2];
  e[b + 1] = e[2 * this.cnt - 1];
  e[2 * this.cnt - 1] = null;
  e[2 * this.cnt - 2] = null;
  a.cnt -= 1;
  return a;
};
cljs.core.HashCollisionNode.prototype.ensure_editable = function(a) {
  if (a === this.edit) {
    return this;
  }
  var b = Array(2 * (this.cnt + 1));
  cljs.core.array_copy.call(null, this.arr, 0, b, 0, 2 * this.cnt);
  return new cljs.core.HashCollisionNode(a, this.collision_hash, this.cnt, b);
};
cljs.core.HashCollisionNode.prototype.kv_reduce = function(a, b) {
  return cljs.core.inode_kv_reduce.call(null, this.arr, a, b);
};
cljs.core.HashCollisionNode.prototype.inode_find = function(a, b, c, d) {
  a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
  return 0 > a ? d : cljs.core.key_test.call(null, c, this.arr[a]) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.arr[a], this.arr[a + 1]], null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? d : null;
};
cljs.core.HashCollisionNode.prototype.inode_without = function(a, b, c) {
  a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
  return-1 === a ? this : 1 === this.cnt ? null : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt - 1, cljs.core.remove_pair.call(null, this.arr, cljs.core.quot.call(null, a, 2))) : null;
};
cljs.core.HashCollisionNode.prototype.inode_assoc = function(a, b, c, d, e) {
  return b === this.collision_hash ? (a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c), -1 === a ? (a = 2 * this.cnt, b = Array(a + 2), cljs.core.array_copy.call(null, this.arr, 0, b, 0, a), b[a] = c, b[a + 1] = d, e.val = !0, new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt + 1, b)) : cljs.core._EQ_.call(null, this.arr[a], d) ? this : new cljs.core.HashCollisionNode(null, this.collision_hash, this.cnt, cljs.core.clone_and_set.call(null, this.arr, 
  a + 1, d))) : (new cljs.core.BitmapIndexedNode(null, 1 << (this.collision_hash >>> a & 31), [null, this])).inode_assoc(a, b, c, d, e);
};
cljs.core.HashCollisionNode.prototype.inode_lookup = function(a, b, c, d) {
  a = cljs.core.hash_collision_node_find_index.call(null, this.arr, this.cnt, c);
  return 0 > a ? d : cljs.core.key_test.call(null, c, this.arr[a]) ? this.arr[a + 1] : new cljs.core.Keyword(null, "else", "else", 1017020587) ? d : null;
};
cljs.core.HashCollisionNode.prototype.ensure_editable_array = function(a, b, c) {
  return a === this.edit ? (this.arr = c, this.cnt = b, this) : new cljs.core.HashCollisionNode(this.edit, this.collision_hash, b, c);
};
cljs.core.__GT_HashCollisionNode = function(a, b, c, d) {
  return new cljs.core.HashCollisionNode(a, b, c, d);
};
cljs.core.create_node = function() {
  var a = null, b = function(a, b, c, g, h, k) {
    var l = cljs.core.hash.call(null, b);
    if (l === g) {
      return new cljs.core.HashCollisionNode(null, l, 2, [b, c, h, k]);
    }
    var m = new cljs.core.Box(!1);
    return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc(a, l, b, c, m).inode_assoc(a, g, h, k, m);
  }, c = function(a, b, c, g, h, k, l) {
    var m = cljs.core.hash.call(null, c);
    if (m === h) {
      return new cljs.core.HashCollisionNode(null, m, 2, [c, g, k, l]);
    }
    var n = new cljs.core.Box(!1);
    return cljs.core.BitmapIndexedNode.EMPTY.inode_assoc_BANG_(a, b, m, c, g, n).inode_assoc_BANG_(a, b, h, k, l, n);
  }, a = function(a, e, f, g, h, k, l) {
    switch(arguments.length) {
      case 6:
        return b.call(this, a, e, f, g, h, k);
      case 7:
        return c.call(this, a, e, f, g, h, k, l);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$6 = b;
  a.cljs$core$IFn$_invoke$arity$7 = c;
  return a;
}();
cljs.core.NodeSeq = function(a, b, c, d, e) {
  this.meta = a;
  this.nodes = b;
  this.i = c;
  this.s = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374860;
};
cljs.core.NodeSeq.cljs$lang$type = !0;
cljs.core.NodeSeq.cljs$lang$ctorStr = "cljs.core/NodeSeq";
cljs.core.NodeSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/NodeSeq");
};
cljs.core.NodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.NodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.NodeSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.NodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.NodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return null == this.s ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.nodes[this.i], this.nodes[this.i + 1]], null) : cljs.core.first.call(null, this.s);
};
cljs.core.NodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return null == this.s ? cljs.core.create_inode_seq.call(null, this.nodes, this.i + 2, null) : cljs.core.create_inode_seq.call(null, this.nodes, this.i, cljs.core.next.call(null, this.s));
};
cljs.core.NodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.NodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.NodeSeq(b, this.nodes, this.i, this.s, this.__hash);
};
cljs.core.NodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.NodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_NodeSeq = function(a, b, c, d, e) {
  return new cljs.core.NodeSeq(a, b, c, d, e);
};
cljs.core.create_inode_seq = function() {
  var a = null, b = function(b) {
    return a.call(null, b, 0, null);
  }, c = function(a, b, c) {
    if (null == c) {
      for (c = a.length;;) {
        if (b < c) {
          if (null != a[b]) {
            return new cljs.core.NodeSeq(null, a, b, null, null);
          }
          var g = a[b + 1];
          if (cljs.core.truth_(g) && (g = g.inode_seq(), cljs.core.truth_(g))) {
            return new cljs.core.NodeSeq(null, a, b + 2, g, null);
          }
          b += 2;
        } else {
          return null;
        }
      }
    } else {
      return new cljs.core.NodeSeq(null, a, b, c, null);
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.ArrayNodeSeq = function(a, b, c, d, e) {
  this.meta = a;
  this.nodes = b;
  this.i = c;
  this.s = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374860;
};
cljs.core.ArrayNodeSeq.cljs$lang$type = !0;
cljs.core.ArrayNodeSeq.cljs$lang$ctorStr = "cljs.core/ArrayNodeSeq";
cljs.core.ArrayNodeSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ArrayNodeSeq");
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.ArrayNodeSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core.first.call(null, this.s);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return cljs.core.create_array_node_seq.call(null, null, this.nodes, this.i, cljs.core.next.call(null, this.s));
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.ArrayNodeSeq(b, this.nodes, this.i, this.s, this.__hash);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_ArrayNodeSeq = function(a, b, c, d, e) {
  return new cljs.core.ArrayNodeSeq(a, b, c, d, e);
};
cljs.core.create_array_node_seq = function() {
  var a = null, b = function(b) {
    return a.call(null, null, b, 0, null);
  }, c = function(a, b, c, g) {
    if (null == g) {
      for (g = b.length;;) {
        if (c < g) {
          var h = b[c];
          if (cljs.core.truth_(h) && (h = h.inode_seq(), cljs.core.truth_(h))) {
            return new cljs.core.ArrayNodeSeq(a, b, c + 1, h, null);
          }
          c += 1;
        } else {
          return null;
        }
      }
    } else {
      return new cljs.core.ArrayNodeSeq(a, b, c, g, null);
    }
  }, a = function(a, e, f, g) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 4:
        return c.call(this, a, e, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  return a;
}();
cljs.core.PersistentHashMap = function(a, b, c, d, e, f) {
  this.meta = a;
  this.cnt = b;
  this.root = c;
  this.has_nil_QMARK_ = d;
  this.nil_val = e;
  this.__hash = f;
  this.cljs$lang$protocol_mask$partition1$ = 4;
  this.cljs$lang$protocol_mask$partition0$ = 16123663;
};
cljs.core.PersistentHashMap.cljs$lang$type = !0;
cljs.core.PersistentHashMap.cljs$lang$ctorStr = "cljs.core/PersistentHashMap";
cljs.core.PersistentHashMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentHashMap");
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
  return new cljs.core.TransientHashMap({}, this.root, this.cnt, this.has_nil_QMARK_, this.nil_val);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_imap.call(null, this);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return null == b ? this.has_nil_QMARK_ ? this.nil_val : c : null == this.root ? c : new cljs.core.Keyword(null, "else", "else", 1017020587) ? this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, c) : null;
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  if (null == b) {
    return this.has_nil_QMARK_ && c === this.nil_val ? this : new cljs.core.PersistentHashMap(this.meta, this.has_nil_QMARK_ ? this.cnt : this.cnt + 1, this.root, !0, c, null);
  }
  a = new cljs.core.Box(!1);
  b = (null == this.root ? cljs.core.BitmapIndexedNode.EMPTY : this.root).inode_assoc(0, cljs.core.hash.call(null, b), b, c, a);
  return b === this.root ? this : new cljs.core.PersistentHashMap(this.meta, a.val ? this.cnt + 1 : this.cnt, b, this.has_nil_QMARK_, this.nil_val, null);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
  return null == b ? this.has_nil_QMARK_ : null == this.root ? !1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, cljs.core.lookup_sentinel) !== cljs.core.lookup_sentinel : null;
};
cljs.core.PersistentHashMap.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentHashMap.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
  a = this.has_nil_QMARK_ ? b.call(null, c, null, this.nil_val) : c;
  return cljs.core.reduced_QMARK_.call(null, a) ? cljs.core.deref.call(null, a) : null != this.root ? this.root.kv_reduce(b, a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? a : null;
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.vector_QMARK_.call(null, b) ? cljs.core._assoc.call(null, this, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, this, b);
};
cljs.core.PersistentHashMap.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return 0 < this.cnt ? (a = null != this.root ? this.root.inode_seq() : null, this.has_nil_QMARK_ ? cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, this.nil_val], null), a) : a) : null;
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.cnt;
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_map.call(null, this, b);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentHashMap(b, this.cnt, this.root, this.has_nil_QMARK_, this.nil_val, this.__hash);
};
cljs.core.PersistentHashMap.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentHashMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentHashMap(this.meta, this.cnt, this.root, this.has_nil_QMARK_, this.nil_val, this.__hash);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentHashMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core._with_meta.call(null, cljs.core.PersistentHashMap.EMPTY, this.meta);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
  if (null == b) {
    return this.has_nil_QMARK_ ? new cljs.core.PersistentHashMap(this.meta, this.cnt - 1, this.root, !1, null, null) : this;
  }
  if (null == this.root) {
    return this;
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    var c = this.root.inode_without(0, cljs.core.hash.call(null, b), b);
    return c === this.root ? this : new cljs.core.PersistentHashMap(this.meta, this.cnt - 1, c, this.has_nil_QMARK_, this.nil_val, null);
  }
  return null;
};
cljs.core.__GT_PersistentHashMap = function(a, b, c, d, e, f) {
  return new cljs.core.PersistentHashMap(a, b, c, d, e, f);
};
cljs.core.PersistentHashMap.EMPTY = new cljs.core.PersistentHashMap(null, 0, null, !1, null, 0);
cljs.core.PersistentHashMap.fromArrays = function(a, b) {
  for (var c = a.length, d = 0, e = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);;) {
    if (d < c) {
      var f = d + 1, e = cljs.core._assoc_BANG_.call(null, e, a[d], b[d]), d = f
    } else {
      return cljs.core.persistent_BANG_.call(null, e);
    }
  }
};
cljs.core.TransientHashMap = function(a, b, c, d, e) {
  this.edit = a;
  this.root = b;
  this.count = c;
  this.has_nil_QMARK_ = d;
  this.nil_val = e;
  this.cljs$lang$protocol_mask$partition1$ = 56;
  this.cljs$lang$protocol_mask$partition0$ = 258;
};
cljs.core.TransientHashMap.cljs$lang$type = !0;
cljs.core.TransientHashMap.cljs$lang$ctorStr = "cljs.core/TransientHashMap";
cljs.core.TransientHashMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/TransientHashMap");
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientMap$_dissoc_BANG_$arity$2 = function(a, b) {
  return this.without_BANG_(b);
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientAssociative$_assoc_BANG_$arity$3 = function(a, b, c) {
  return this.assoc_BANG_(b, c);
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
  return this.conj_BANG_(b);
};
cljs.core.TransientHashMap.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
  return this.persistent_BANG_();
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return null == b ? this.has_nil_QMARK_ ? this.nil_val : null : null == this.root ? null : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b);
};
cljs.core.TransientHashMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return null == b ? this.has_nil_QMARK_ ? this.nil_val : c : null == this.root ? c : this.root.inode_lookup(0, cljs.core.hash.call(null, b), b, c);
};
cljs.core.TransientHashMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  if (this.edit) {
    return this.count;
  }
  throw Error("count after persistent!");
};
cljs.core.TransientHashMap.prototype.conj_BANG_ = function(a) {
  if (this.edit) {
    if (a ? a.cljs$lang$protocol_mask$partition0$ & 2048 || a.cljs$core$IMapEntry$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMapEntry, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMapEntry, a)) {
      return this.assoc_BANG_(cljs.core.key.call(null, a), cljs.core.val.call(null, a));
    }
    a = cljs.core.seq.call(null, a);
    for (var b = this;;) {
      var c = cljs.core.first.call(null, a);
      if (cljs.core.truth_(c)) {
        a = cljs.core.next.call(null, a), b = b.assoc_BANG_(cljs.core.key.call(null, c), cljs.core.val.call(null, c));
      } else {
        return b;
      }
    }
  } else {
    throw Error("conj! after persistent");
  }
};
cljs.core.TransientHashMap.prototype.assoc_BANG_ = function(a, b) {
  if (this.edit) {
    if (null == a) {
      this.nil_val !== b && (this.nil_val = b), this.has_nil_QMARK_ || (this.count += 1, this.has_nil_QMARK_ = !0);
    } else {
      var c = new cljs.core.Box(!1), d = (null == this.root ? cljs.core.BitmapIndexedNode.EMPTY : this.root).inode_assoc_BANG_(this.edit, 0, cljs.core.hash.call(null, a), a, b, c);
      d !== this.root && (this.root = d);
      c.val && (this.count += 1);
    }
    return this;
  }
  throw Error("assoc! after persistent!");
};
cljs.core.TransientHashMap.prototype.without_BANG_ = function(a) {
  if (this.edit) {
    if (null == a) {
      this.has_nil_QMARK_ && (this.has_nil_QMARK_ = !1, this.nil_val = null, this.count -= 1);
    } else {
      if (null != this.root) {
        var b = new cljs.core.Box(!1);
        a = this.root.inode_without_BANG_(this.edit, 0, cljs.core.hash.call(null, a), a, b);
        a !== this.root && (this.root = a);
        cljs.core.truth_(b[0]) && (this.count -= 1);
      }
    }
    return this;
  }
  throw Error("dissoc! after persistent!");
};
cljs.core.TransientHashMap.prototype.persistent_BANG_ = function() {
  if (this.edit) {
    return this.edit = null, new cljs.core.PersistentHashMap(null, this.count, this.root, this.has_nil_QMARK_, this.nil_val, null);
  }
  throw Error("persistent! called twice");
};
cljs.core.__GT_TransientHashMap = function(a, b, c, d, e) {
  return new cljs.core.TransientHashMap(a, b, c, d, e);
};
cljs.core.tree_map_seq_push = function(a, b, c) {
  for (var d = b;;) {
    if (null != a) {
      b = c ? a.left : a.right, d = cljs.core.conj.call(null, d, a), a = b;
    } else {
      return d;
    }
  }
};
cljs.core.PersistentTreeMapSeq = function(a, b, c, d, e) {
  this.meta = a;
  this.stack = b;
  this.ascending_QMARK_ = c;
  this.cnt = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374862;
};
cljs.core.PersistentTreeMapSeq.cljs$lang$type = !0;
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorStr = "cljs.core/PersistentTreeMapSeq";
cljs.core.PersistentTreeMapSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentTreeMapSeq");
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.PersistentTreeMapSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return 0 > this.cnt ? cljs.core.count.call(null, cljs.core.next.call(null, this)) + 1 : this.cnt;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return cljs.core.peek.call(null, this.stack);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  a = cljs.core.first.call(null, this.stack);
  a = cljs.core.tree_map_seq_push.call(null, this.ascending_QMARK_ ? a.right : a.left, cljs.core.next.call(null, this.stack), this.ascending_QMARK_);
  return null != a ? new cljs.core.PersistentTreeMapSeq(null, a, this.ascending_QMARK_, this.cnt - 1, null) : cljs.core.List.EMPTY;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentTreeMapSeq(b, this.stack, this.ascending_QMARK_, this.cnt, this.__hash);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_PersistentTreeMapSeq = function(a, b, c, d, e) {
  return new cljs.core.PersistentTreeMapSeq(a, b, c, d, e);
};
cljs.core.create_tree_map_seq = function(a, b, c) {
  return new cljs.core.PersistentTreeMapSeq(null, cljs.core.tree_map_seq_push.call(null, a, null, b), b, c, null);
};
cljs.core.balance_left = function(a, b, c, d) {
  return c instanceof cljs.core.RedNode ? c.left instanceof cljs.core.RedNode ? new cljs.core.RedNode(c.key, c.val, c.left.blacken(), new cljs.core.BlackNode(a, b, c.right, d, null), null) : c.right instanceof cljs.core.RedNode ? new cljs.core.RedNode(c.right.key, c.right.val, new cljs.core.BlackNode(c.key, c.val, c.left, c.right.left, null), new cljs.core.BlackNode(a, b, c.right.right, d, null), null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.BlackNode(a, b, c, d, 
  null) : null : new cljs.core.BlackNode(a, b, c, d, null);
};
cljs.core.balance_right = function(a, b, c, d) {
  return d instanceof cljs.core.RedNode ? d.right instanceof cljs.core.RedNode ? new cljs.core.RedNode(d.key, d.val, new cljs.core.BlackNode(a, b, c, d.left, null), d.right.blacken(), null) : d.left instanceof cljs.core.RedNode ? new cljs.core.RedNode(d.left.key, d.left.val, new cljs.core.BlackNode(a, b, c, d.left.left, null), new cljs.core.BlackNode(d.key, d.val, d.left.right, d.right, null), null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.BlackNode(a, b, c, d, null) : 
  null : new cljs.core.BlackNode(a, b, c, d, null);
};
cljs.core.balance_left_del = function(a, b, c, d) {
  if (c instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(a, b, c.blacken(), d, null);
  }
  if (d instanceof cljs.core.BlackNode) {
    return cljs.core.balance_right.call(null, a, b, c, d.redden());
  }
  if (d instanceof cljs.core.RedNode && d.left instanceof cljs.core.BlackNode) {
    return new cljs.core.RedNode(d.left.key, d.left.val, new cljs.core.BlackNode(a, b, c, d.left.left, null), cljs.core.balance_right.call(null, d.key, d.val, d.left.right, d.right.redden()), null);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error("red-black tree invariant violation");
  }
  return null;
};
cljs.core.balance_right_del = function(a, b, c, d) {
  if (d instanceof cljs.core.RedNode) {
    return new cljs.core.RedNode(a, b, c, d.blacken(), null);
  }
  if (c instanceof cljs.core.BlackNode) {
    return cljs.core.balance_left.call(null, a, b, c.redden(), d);
  }
  if (c instanceof cljs.core.RedNode && c.right instanceof cljs.core.BlackNode) {
    return new cljs.core.RedNode(c.right.key, c.right.val, cljs.core.balance_left.call(null, c.key, c.val, c.left.redden(), c.right.left), new cljs.core.BlackNode(a, b, c.right.right, d, null), null);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw Error("red-black tree invariant violation");
  }
  return null;
};
cljs.core.tree_map_kv_reduce = function tree_map_kv_reduce(b, c, d) {
  d = null != b.left ? tree_map_kv_reduce.call(null, b.left, c, d) : d;
  if (cljs.core.reduced_QMARK_.call(null, d)) {
    return cljs.core.deref.call(null, d);
  }
  d = c.call(null, d, b.key, b.val);
  if (cljs.core.reduced_QMARK_.call(null, d)) {
    return cljs.core.deref.call(null, d);
  }
  b = null != b.right ? tree_map_kv_reduce.call(null, b.right, c, d) : d;
  return cljs.core.reduced_QMARK_.call(null, b) ? cljs.core.deref.call(null, b) : b;
};
cljs.core.BlackNode = function(a, b, c, d, e) {
  this.key = a;
  this.val = b;
  this.left = c;
  this.right = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32402207;
};
cljs.core.BlackNode.cljs$lang$type = !0;
cljs.core.BlackNode.cljs$lang$ctorStr = "cljs.core/BlackNode";
cljs.core.BlackNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/BlackNode");
};
cljs.core.BlackNode.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._nth.call(null, this, b, null);
};
cljs.core.BlackNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._nth.call(null, this, b, c);
};
cljs.core.BlackNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  return cljs.core.assoc.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null), b, c);
};
cljs.core.BlackNode.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.BlackNode.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.BlackNode.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.BlackNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val, b], null);
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(a) {
  return this.key;
};
cljs.core.BlackNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(a) {
  return this.val;
};
cljs.core.BlackNode.prototype.add_right = function(a) {
  return a.balance_right(this);
};
cljs.core.BlackNode.prototype.redden = function() {
  return new cljs.core.RedNode(this.key, this.val, this.left, this.right, null);
};
cljs.core.BlackNode.prototype.remove_right = function(a) {
  return cljs.core.balance_right_del.call(null, this.key, this.val, this.left, a);
};
cljs.core.BlackNode.prototype.replace = function(a, b, c, d) {
  return new cljs.core.BlackNode(a, b, c, d, null);
};
cljs.core.BlackNode.prototype.kv_reduce = function(a, b) {
  return cljs.core.tree_map_kv_reduce.call(null, this, a, b);
};
cljs.core.BlackNode.prototype.remove_left = function(a) {
  return cljs.core.balance_left_del.call(null, this.key, this.val, a, this.right);
};
cljs.core.BlackNode.prototype.add_left = function(a) {
  return a.balance_left(this);
};
cljs.core.BlackNode.prototype.balance_left = function(a) {
  return new cljs.core.BlackNode(a.key, a.val, this, a.right, null);
};
cljs.core.BlackNode.prototype.balance_right = function(a) {
  return new cljs.core.BlackNode(a.key, a.val, a.left, this, null);
};
cljs.core.BlackNode.prototype.blacken = function() {
  return this;
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, this, b);
};
cljs.core.BlackNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, this, b, c);
};
cljs.core.BlackNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, this.val), this.key);
};
cljs.core.BlackNode.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return 2;
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return this.val;
};
cljs.core.BlackNode.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key], null);
};
cljs.core.BlackNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
  return(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null)).cljs$core$IVector$_assoc_n$arity$3(null, b, c);
};
cljs.core.BlackNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.BlackNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null), b);
};
cljs.core.BlackNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return null;
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  if (0 === b) {
    return this.key;
  }
  if (1 === b) {
    return this.val;
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
cljs.core.BlackNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 === b ? this.key : 1 === b ? this.val : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null;
};
cljs.core.BlackNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.__GT_BlackNode = function(a, b, c, d, e) {
  return new cljs.core.BlackNode(a, b, c, d, e);
};
cljs.core.RedNode = function(a, b, c, d, e) {
  this.key = a;
  this.val = b;
  this.left = c;
  this.right = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32402207;
};
cljs.core.RedNode.cljs$lang$type = !0;
cljs.core.RedNode.cljs$lang$ctorStr = "cljs.core/RedNode";
cljs.core.RedNode.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/RedNode");
};
cljs.core.RedNode.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._nth.call(null, this, b, null);
};
cljs.core.RedNode.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._nth.call(null, this, b, c);
};
cljs.core.RedNode.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  return cljs.core.assoc.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null), b, c);
};
cljs.core.RedNode.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.RedNode.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.RedNode.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.RedNode.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val, b], null);
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_key$arity$1 = function(a) {
  return this.key;
};
cljs.core.RedNode.prototype.cljs$core$IMapEntry$_val$arity$1 = function(a) {
  return this.val;
};
cljs.core.RedNode.prototype.add_right = function(a) {
  return new cljs.core.RedNode(this.key, this.val, this.left, a, null);
};
cljs.core.RedNode.prototype.redden = function() {
  throw Error("red-black tree invariant violation");
};
cljs.core.RedNode.prototype.remove_right = function(a) {
  return new cljs.core.RedNode(this.key, this.val, this.left, a, null);
};
cljs.core.RedNode.prototype.replace = function(a, b, c, d) {
  return new cljs.core.RedNode(a, b, c, d, null);
};
cljs.core.RedNode.prototype.kv_reduce = function(a, b) {
  return cljs.core.tree_map_kv_reduce.call(null, this, a, b);
};
cljs.core.RedNode.prototype.remove_left = function(a) {
  return new cljs.core.RedNode(this.key, this.val, a, this.right, null);
};
cljs.core.RedNode.prototype.add_left = function(a) {
  return new cljs.core.RedNode(this.key, this.val, a, this.right, null);
};
cljs.core.RedNode.prototype.balance_left = function(a) {
  return this.left instanceof cljs.core.RedNode ? new cljs.core.RedNode(this.key, this.val, this.left.blacken(), new cljs.core.BlackNode(a.key, a.val, this.right, a.right, null), null) : this.right instanceof cljs.core.RedNode ? new cljs.core.RedNode(this.right.key, this.right.val, new cljs.core.BlackNode(this.key, this.val, this.left, this.right.left, null), new cljs.core.BlackNode(a.key, a.val, this.right.right, a.right, null), null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.BlackNode(a.key, 
  a.val, this, a.right, null) : null;
};
cljs.core.RedNode.prototype.balance_right = function(a) {
  return this.right instanceof cljs.core.RedNode ? new cljs.core.RedNode(this.key, this.val, new cljs.core.BlackNode(a.key, a.val, a.left, this.left, null), this.right.blacken(), null) : this.left instanceof cljs.core.RedNode ? new cljs.core.RedNode(this.left.key, this.left.val, new cljs.core.BlackNode(a.key, a.val, a.left, this.left.left, null), new cljs.core.BlackNode(this.key, this.val, this.left.right, this.right, null), null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.BlackNode(a.key, 
  a.val, a.left, this, null) : null;
};
cljs.core.RedNode.prototype.blacken = function() {
  return new cljs.core.BlackNode(this.key, this.val, this.left, this.right, null);
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, this, b);
};
cljs.core.RedNode.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, this, b, c);
};
cljs.core.RedNode.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, this.val), this.key);
};
cljs.core.RedNode.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return 2;
};
cljs.core.RedNode.prototype.cljs$core$IStack$_peek$arity$1 = function(a) {
  return this.val;
};
cljs.core.RedNode.prototype.cljs$core$IStack$_pop$arity$1 = function(a) {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key], null);
};
cljs.core.RedNode.prototype.cljs$core$IVector$_assoc_n$arity$3 = function(a, b, c) {
  return(new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null)).cljs$core$IVector$_assoc_n$arity$3(null, b, c);
};
cljs.core.RedNode.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.RedNode.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return cljs.core.with_meta.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [this.key, this.val], null), b);
};
cljs.core.RedNode.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return null;
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  if (0 === b) {
    return this.key;
  }
  if (1 === b) {
    return this.val;
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
cljs.core.RedNode.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return 0 === b ? this.key : 1 === b ? this.val : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null;
};
cljs.core.RedNode.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.PersistentVector.EMPTY;
};
cljs.core.__GT_RedNode = function(a, b, c, d, e) {
  return new cljs.core.RedNode(a, b, c, d, e);
};
cljs.core.tree_map_add = function tree_map_add(b, c, d, e, f) {
  if (null == c) {
    return new cljs.core.RedNode(d, e, null, null, null);
  }
  var g = b.call(null, d, c.key);
  return 0 === g ? (f[0] = c, null) : 0 > g ? (b = tree_map_add.call(null, b, c.left, d, e, f), null != b ? c.add_left(b) : null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (b = tree_map_add.call(null, b, c.right, d, e, f), null != b ? c.add_right(b) : null) : null;
};
cljs.core.tree_map_append = function tree_map_append(b, c) {
  if (null == b) {
    return c;
  }
  if (null == c) {
    return b;
  }
  if (b instanceof cljs.core.RedNode) {
    if (c instanceof cljs.core.RedNode) {
      var d = tree_map_append.call(null, b.right, c.left);
      return d instanceof cljs.core.RedNode ? new cljs.core.RedNode(d.key, d.val, new cljs.core.RedNode(b.key, b.val, b.left, d.left, null), new cljs.core.RedNode(c.key, c.val, d.right, c.right, null), null) : new cljs.core.RedNode(b.key, b.val, b.left, new cljs.core.RedNode(c.key, c.val, d, c.right, null), null);
    }
    return new cljs.core.RedNode(b.key, b.val, b.left, tree_map_append.call(null, b.right, c), null);
  }
  return c instanceof cljs.core.RedNode ? new cljs.core.RedNode(c.key, c.val, tree_map_append.call(null, b, c.left), c.right, null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (d = tree_map_append.call(null, b.right, c.left), d instanceof cljs.core.RedNode ? new cljs.core.RedNode(d.key, d.val, new cljs.core.BlackNode(b.key, b.val, b.left, d.left, null), new cljs.core.BlackNode(c.key, c.val, d.right, c.right, null), null) : cljs.core.balance_left_del.call(null, b.key, b.val, b.left, 
  new cljs.core.BlackNode(c.key, c.val, d, c.right, null))) : null;
};
cljs.core.tree_map_remove = function tree_map_remove(b, c, d, e) {
  if (null != c) {
    var f = b.call(null, d, c.key);
    if (0 === f) {
      return e[0] = c, cljs.core.tree_map_append.call(null, c.left, c.right);
    }
    if (0 > f) {
      return b = tree_map_remove.call(null, b, c.left, d, e), null != b || null != e[0] ? c.left instanceof cljs.core.BlackNode ? cljs.core.balance_left_del.call(null, c.key, c.val, b, c.right) : new cljs.core.RedNode(c.key, c.val, b, c.right, null) : null;
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      return b = tree_map_remove.call(null, b, c.right, d, e), null != b || null != e[0] ? c.right instanceof cljs.core.BlackNode ? cljs.core.balance_right_del.call(null, c.key, c.val, c.left, b) : new cljs.core.RedNode(c.key, c.val, c.left, b, null) : null;
    }
  }
  return null;
};
cljs.core.tree_map_replace = function tree_map_replace(b, c, d, e) {
  var f = c.key, g = b.call(null, d, f);
  return 0 === g ? c.replace(f, e, c.left, c.right) : 0 > g ? c.replace(f, c.val, tree_map_replace.call(null, b, c.left, d, e), c.right) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c.replace(f, c.val, c.left, tree_map_replace.call(null, b, c.right, d, e)) : null;
};
cljs.core.PersistentTreeMap = function(a, b, c, d, e) {
  this.comp = a;
  this.tree = b;
  this.cnt = c;
  this.meta = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 418776847;
};
cljs.core.PersistentTreeMap.cljs$lang$type = !0;
cljs.core.PersistentTreeMap.cljs$lang$ctorStr = "cljs.core/PersistentTreeMap";
cljs.core.PersistentTreeMap.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentTreeMap");
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_imap.call(null, this);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  a = this.entry_at(b);
  return null != a ? a.val : c;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_assoc$arity$3 = function(a, b, c) {
  a = [null];
  var d = cljs.core.tree_map_add.call(null, this.comp, this.tree, b, c, a);
  return null == d ? (a = cljs.core.nth.call(null, a, 0), cljs.core._EQ_.call(null, c, a.val) ? this : new cljs.core.PersistentTreeMap(this.comp, cljs.core.tree_map_replace.call(null, this.comp, this.tree, b, c), this.cnt, this.meta, null)) : new cljs.core.PersistentTreeMap(this.comp, d.blacken(), this.cnt + 1, this.meta, null);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IAssociative$_contains_key_QMARK_$arity$2 = function(a, b) {
  return null != this.entry_at(b);
};
cljs.core.PersistentTreeMap.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentTreeMap.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IKVReduce$_kv_reduce$arity$3 = function(a, b, c) {
  return null != this.tree ? cljs.core.tree_map_kv_reduce.call(null, this.tree, b, c) : c;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.vector_QMARK_.call(null, b) ? cljs.core._assoc.call(null, this, cljs.core._nth.call(null, b, 0), cljs.core._nth.call(null, b, 1)) : cljs.core.reduce.call(null, cljs.core._conj, this, b);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
  return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, !1, this.cnt) : null;
};
cljs.core.PersistentTreeMap.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentTreeMap.prototype.entry_at = function(a) {
  for (var b = this.tree;;) {
    if (null != b) {
      var c = this.comp.call(null, a, b.key);
      if (0 === c) {
        return b;
      }
      if (0 > c) {
        b = b.left;
      } else {
        if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
          b = b.right;
        } else {
          return null;
        }
      }
    } else {
      return null;
    }
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(a, b) {
  return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, b, this.cnt) : null;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(a, b, c) {
  if (0 < this.cnt) {
    a = null;
    for (var d = this.tree;;) {
      if (null != d) {
        var e = this.comp.call(null, b, d.key);
        if (0 === e) {
          return new cljs.core.PersistentTreeMapSeq(null, cljs.core.conj.call(null, a, d), c, -1, null);
        }
        if (cljs.core.truth_(c)) {
          0 > e ? (a = cljs.core.conj.call(null, a, d), d = d.left) : d = d.right;
        } else {
          if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
            0 < e ? (a = cljs.core.conj.call(null, a, d), d = d.right) : d = d.left;
          } else {
            return null;
          }
        }
      } else {
        return null == a ? null : new cljs.core.PersistentTreeMapSeq(null, a, c, -1, null);
      }
    }
  } else {
    return null;
  }
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(a, b) {
  return cljs.core.key.call(null, b);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISorted$_comparator$arity$1 = function(a) {
  return this.comp;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return 0 < this.cnt ? cljs.core.create_tree_map_seq.call(null, this.tree, !0, this.cnt) : null;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.cnt;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_map.call(null, this, b);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentTreeMap(this.comp, this.tree, this.cnt, b, this.__hash);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentTreeMap.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentTreeMap(this.comp, this.tree, this.cnt, this.meta, this.__hash);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentTreeMap.EMPTY, this.meta);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IMap$_dissoc$arity$2 = function(a, b) {
  var c = [null], d = cljs.core.tree_map_remove.call(null, this.comp, this.tree, b, c);
  return null == d ? null == cljs.core.nth.call(null, c, 0) ? this : new cljs.core.PersistentTreeMap(this.comp, null, 0, this.meta, null) : new cljs.core.PersistentTreeMap(this.comp, d.blacken(), this.cnt - 1, this.meta, null);
};
cljs.core.__GT_PersistentTreeMap = function(a, b, c, d, e) {
  return new cljs.core.PersistentTreeMap(a, b, c, d, e);
};
cljs.core.PersistentTreeMap.EMPTY = new cljs.core.PersistentTreeMap(cljs.core.compare, null, 0, null, 0);
cljs.core.hash_map = function() {
  var a = function(a) {
    a = cljs.core.seq.call(null, a);
    for (var b = cljs.core.transient$.call(null, cljs.core.PersistentHashMap.EMPTY);;) {
      if (a) {
        var e = cljs.core.nnext.call(null, a), b = cljs.core.assoc_BANG_.call(null, b, cljs.core.first.call(null, a), cljs.core.second.call(null, a));
        a = e;
      } else {
        return cljs.core.persistent_BANG_.call(null, b);
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.array_map = function() {
  var a = function(a) {
    return new cljs.core.PersistentArrayMap(null, cljs.core.quot.call(null, cljs.core.count.call(null, a), 2), cljs.core.apply.call(null, cljs.core.array, a), null);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.obj_map = function() {
  var a = function(a) {
    var b = [], e;
    e = {};
    for (a = cljs.core.seq.call(null, a);;) {
      if (a) {
        b.push(cljs.core.first.call(null, a)), e[cljs.core.first.call(null, a)] = cljs.core.second.call(null, a), a = cljs.core.nnext.call(null, a);
      } else {
        return cljs.core.ObjMap.fromObject.call(null, b, e);
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.sorted_map = function() {
  var a = function(a) {
    a = cljs.core.seq.call(null, a);
    for (var b = cljs.core.PersistentTreeMap.EMPTY;;) {
      if (a) {
        var e = cljs.core.nnext.call(null, a), b = cljs.core.assoc.call(null, b, cljs.core.first.call(null, a), cljs.core.second.call(null, a));
        a = e;
      } else {
        return b;
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.sorted_map_by = function() {
  var a = function(a, b) {
    for (var e = cljs.core.seq.call(null, b), f = new cljs.core.PersistentTreeMap(cljs.core.fn__GT_comparator.call(null, a), null, 0, null, 0);;) {
      if (e) {
        var g = cljs.core.nnext.call(null, e), f = cljs.core.assoc.call(null, f, cljs.core.first.call(null, e), cljs.core.second.call(null, e)), e = g
      } else {
        return f;
      }
    }
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.KeySeq = function(a, b) {
  this.mseq = a;
  this._meta = b;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
};
cljs.core.KeySeq.cljs$lang$type = !0;
cljs.core.KeySeq.cljs$lang$ctorStr = "cljs.core/KeySeq";
cljs.core.KeySeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/KeySeq");
};
cljs.core.KeySeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return cljs.core.hash_coll.call(null, this);
};
cljs.core.KeySeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  a = ((a = this.mseq) ? a.cljs$lang$protocol_mask$partition0$ & 128 || a.cljs$core$INext$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) ? cljs.core._next.call(null, this.mseq) : cljs.core.next.call(null, this.mseq);
  return null == a ? null : new cljs.core.KeySeq(a, this._meta);
};
cljs.core.KeySeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.KeySeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.KeySeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.KeySeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.KeySeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  a = cljs.core._first.call(null, this.mseq);
  return cljs.core._key.call(null, a);
};
cljs.core.KeySeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  a = ((a = this.mseq) ? a.cljs$lang$protocol_mask$partition0$ & 128 || a.cljs$core$INext$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) ? cljs.core._next.call(null, this.mseq) : cljs.core.next.call(null, this.mseq);
  return null != a ? new cljs.core.KeySeq(a, this._meta) : cljs.core.List.EMPTY;
};
cljs.core.KeySeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.KeySeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.KeySeq(this.mseq, b);
};
cljs.core.KeySeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this._meta;
};
cljs.core.KeySeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this._meta);
};
cljs.core.__GT_KeySeq = function(a, b) {
  return new cljs.core.KeySeq(a, b);
};
cljs.core.keys = function(a) {
  return(a = cljs.core.seq.call(null, a)) ? new cljs.core.KeySeq(a, null) : null;
};
cljs.core.key = function(a) {
  return cljs.core._key.call(null, a);
};
cljs.core.ValSeq = function(a, b) {
  this.mseq = a;
  this._meta = b;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32374988;
};
cljs.core.ValSeq.cljs$lang$type = !0;
cljs.core.ValSeq.cljs$lang$ctorStr = "cljs.core/ValSeq";
cljs.core.ValSeq.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ValSeq");
};
cljs.core.ValSeq.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return cljs.core.hash_coll.call(null, this);
};
cljs.core.ValSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  a = ((a = this.mseq) ? a.cljs$lang$protocol_mask$partition0$ & 128 || a.cljs$core$INext$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) ? cljs.core._next.call(null, this.mseq) : cljs.core.next.call(null, this.mseq);
  return null == a ? null : new cljs.core.ValSeq(a, this._meta);
};
cljs.core.ValSeq.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.ValSeq.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.seq_reduce.call(null, b, this);
};
cljs.core.ValSeq.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.seq_reduce.call(null, b, c, this);
};
cljs.core.ValSeq.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return this;
};
cljs.core.ValSeq.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  a = cljs.core._first.call(null, this.mseq);
  return cljs.core._val.call(null, a);
};
cljs.core.ValSeq.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  a = ((a = this.mseq) ? a.cljs$lang$protocol_mask$partition0$ & 128 || a.cljs$core$INext$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.INext, a)) ? cljs.core._next.call(null, this.mseq) : cljs.core.next.call(null, this.mseq);
  return null != a ? new cljs.core.ValSeq(a, this._meta) : cljs.core.List.EMPTY;
};
cljs.core.ValSeq.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.ValSeq.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.ValSeq(this.mseq, b);
};
cljs.core.ValSeq.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this._meta;
};
cljs.core.ValSeq.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this._meta);
};
cljs.core.__GT_ValSeq = function(a, b) {
  return new cljs.core.ValSeq(a, b);
};
cljs.core.vals = function(a) {
  return(a = cljs.core.seq.call(null, a)) ? new cljs.core.ValSeq(a, null) : null;
};
cljs.core.val = function(a) {
  return cljs.core._val.call(null, a);
};
cljs.core.merge = function() {
  var a = function(a) {
    return cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, a)) ? cljs.core.reduce.call(null, function(a, b) {
      return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentArrayMap.EMPTY, b);
    }, a) : null;
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.merge_with = function() {
  var a = function(a, b) {
    if (cljs.core.truth_(cljs.core.some.call(null, cljs.core.identity, b))) {
      var e = function(a) {
        return function(b, c) {
          return cljs.core.reduce.call(null, a, cljs.core.truth_(b) ? b : cljs.core.PersistentArrayMap.EMPTY, cljs.core.seq.call(null, c));
        };
      }(function(b, d) {
        var e = cljs.core.first.call(null, d), k = cljs.core.second.call(null, d);
        return cljs.core.contains_QMARK_.call(null, b, e) ? cljs.core.assoc.call(null, b, e, a.call(null, cljs.core.get.call(null, b, e), k)) : cljs.core.assoc.call(null, b, e, k);
      });
      return cljs.core.reduce.call(null, e, b);
    }
    return null;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.select_keys = function(a, b) {
  for (var c = cljs.core.PersistentArrayMap.EMPTY, d = cljs.core.seq.call(null, b);;) {
    if (d) {
      var e = cljs.core.first.call(null, d), f = cljs.core.get.call(null, a, e, new cljs.core.Keyword("cljs.core", "not-found", "cljs.core/not-found", 4155500789)), c = cljs.core.not_EQ_.call(null, f, new cljs.core.Keyword("cljs.core", "not-found", "cljs.core/not-found", 4155500789)) ? cljs.core.assoc.call(null, c, e, f) : c, d = cljs.core.next.call(null, d)
    } else {
      return c;
    }
  }
};
cljs.core.PersistentHashSet = function(a, b, c) {
  this.meta = a;
  this.hash_map = b;
  this.__hash = c;
  this.cljs$lang$protocol_mask$partition1$ = 4;
  this.cljs$lang$protocol_mask$partition0$ = 15077647;
};
cljs.core.PersistentHashSet.cljs$lang$type = !0;
cljs.core.PersistentHashSet.cljs$lang$ctorStr = "cljs.core/PersistentHashSet";
cljs.core.PersistentHashSet.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentHashSet");
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEditableCollection$_as_transient$arity$1 = function(a) {
  return new cljs.core.TransientHashSet(cljs.core._as_transient.call(null, this.hash_map));
};
cljs.core.PersistentHashSet.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_iset.call(null, this);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._contains_key_QMARK_.call(null, this.hash_map, b) ? b : c;
};
cljs.core.PersistentHashSet.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentHashSet.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.PersistentHashSet(this.meta, cljs.core.assoc.call(null, this.hash_map, b, null), null);
};
cljs.core.PersistentHashSet.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core.keys.call(null, this.hash_map);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(a, b) {
  return new cljs.core.PersistentHashSet(this.meta, cljs.core._dissoc.call(null, this.hash_map, b), null);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return cljs.core._count.call(null, this.hash_map);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  var c = this;
  return cljs.core.set_QMARK_.call(null, b) && cljs.core.count.call(null, c) === cljs.core.count.call(null, b) && cljs.core.every_QMARK_.call(null, function(a) {
    return cljs.core.contains_QMARK_.call(null, c, a);
  }, b);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentHashSet(b, this.hash_map, this.__hash);
};
cljs.core.PersistentHashSet.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentHashSet.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentHashSet(this.meta, this.hash_map, this.__hash);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentHashSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentHashSet.EMPTY, this.meta);
};
cljs.core.__GT_PersistentHashSet = function(a, b, c) {
  return new cljs.core.PersistentHashSet(a, b, c);
};
cljs.core.PersistentHashSet.EMPTY = new cljs.core.PersistentHashSet(null, cljs.core.PersistentArrayMap.EMPTY, 0);
cljs.core.PersistentHashSet.fromArray = function(a, b) {
  var c = a.length;
  if (c <= cljs.core.PersistentArrayMap.HASHMAP_THRESHOLD) {
    b || cljs.core.aclone.call(null, a);
    for (var d = 0, e = cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY);;) {
      if (d < c) {
        var f = d + 1, e = cljs.core._assoc_BANG_.call(null, e, a[d], null), d = f
      } else {
        return new cljs.core.PersistentHashSet(null, cljs.core._persistent_BANG_.call(null, e), null);
      }
    }
  } else {
    for (d = 0, e = cljs.core.transient$.call(null, cljs.core.PersistentHashSet.EMPTY);;) {
      if (d < c) {
        f = d + 1, e = cljs.core._conj_BANG_.call(null, e, a[d]), d = f;
      } else {
        return cljs.core._persistent_BANG_.call(null, e);
      }
    }
  }
};
cljs.core.TransientHashSet = function(a) {
  this.transient_map = a;
  this.cljs$lang$protocol_mask$partition0$ = 259;
  this.cljs$lang$protocol_mask$partition1$ = 136;
};
cljs.core.TransientHashSet.cljs$lang$type = !0;
cljs.core.TransientHashSet.cljs$lang$ctorStr = "cljs.core/TransientHashSet";
cljs.core.TransientHashSet.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/TransientHashSet");
};
cljs.core.TransientHashSet.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        var e;
        e = cljs.core._lookup.call(null, this.transient_map, c, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? null : c;
        return e;
      case 3:
        return e = cljs.core._lookup.call(null, this.transient_map, c, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? d : c, e;
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.TransientHashSet.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return cljs.core._lookup.call(null, this.transient_map, a, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? null : a;
};
cljs.core.TransientHashSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this.transient_map, a, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? b : a;
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.TransientHashSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  return cljs.core._lookup.call(null, this.transient_map, b, cljs.core.lookup_sentinel) === cljs.core.lookup_sentinel ? c : b;
};
cljs.core.TransientHashSet.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return cljs.core.count.call(null, this.transient_map);
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientSet$_disjoin_BANG_$arity$2 = function(a, b) {
  this.transient_map = cljs.core.dissoc_BANG_.call(null, this.transient_map, b);
  return this;
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_conj_BANG_$arity$2 = function(a, b) {
  this.transient_map = cljs.core.assoc_BANG_.call(null, this.transient_map, b, null);
  return this;
};
cljs.core.TransientHashSet.prototype.cljs$core$ITransientCollection$_persistent_BANG_$arity$1 = function(a) {
  return new cljs.core.PersistentHashSet(null, cljs.core.persistent_BANG_.call(null, this.transient_map), null);
};
cljs.core.__GT_TransientHashSet = function(a) {
  return new cljs.core.TransientHashSet(a);
};
cljs.core.PersistentTreeSet = function(a, b, c) {
  this.meta = a;
  this.tree_map = b;
  this.__hash = c;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 417730831;
};
cljs.core.PersistentTreeSet.cljs$lang$type = !0;
cljs.core.PersistentTreeSet.cljs$lang$ctorStr = "cljs.core/PersistentTreeSet";
cljs.core.PersistentTreeSet.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/PersistentTreeSet");
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_iset.call(null, this);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$2 = function(a, b) {
  return cljs.core._lookup.call(null, this, b, null);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ILookup$_lookup$arity$3 = function(a, b, c) {
  a = this.tree_map.entry_at(b);
  return null != a ? a.key : c;
};
cljs.core.PersistentTreeSet.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return this.cljs$core$ILookup$_lookup$arity$2(null, c);
      case 3:
        return this.cljs$core$ILookup$_lookup$arity$3(null, c, d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
cljs.core.PersistentTreeSet.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return this.cljs$core$ILookup$_lookup$arity$2(null, a);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return this.cljs$core$ILookup$_lookup$arity$3(null, a, b);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return new cljs.core.PersistentTreeSet(this.meta, cljs.core.assoc.call(null, this.tree_map, b, null), null);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IReversible$_rseq$arity$1 = function(a) {
  return 0 < cljs.core.count.call(null, this.tree_map) ? cljs.core.map.call(null, cljs.core.key, cljs.core.rseq.call(null, this.tree_map)) : null;
};
cljs.core.PersistentTreeSet.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq$arity$2 = function(a, b) {
  return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq.call(null, this.tree_map, b));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_sorted_seq_from$arity$3 = function(a, b, c) {
  return cljs.core.map.call(null, cljs.core.key, cljs.core._sorted_seq_from.call(null, this.tree_map, b, c));
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_entry_key$arity$2 = function(a, b) {
  return b;
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISorted$_comparator$arity$1 = function(a) {
  return cljs.core._comparator.call(null, this.tree_map);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core.keys.call(null, this.tree_map);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ISet$_disjoin$arity$2 = function(a, b) {
  return new cljs.core.PersistentTreeSet(this.meta, cljs.core.dissoc.call(null, this.tree_map, b), null);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return cljs.core.count.call(null, this.tree_map);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  var c = this;
  return cljs.core.set_QMARK_.call(null, b) && cljs.core.count.call(null, c) === cljs.core.count.call(null, b) && cljs.core.every_QMARK_.call(null, function(a) {
    return cljs.core.contains_QMARK_.call(null, c, a);
  }, b);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.PersistentTreeSet(b, this.tree_map, this.__hash);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$ICloneable$ = !0;
cljs.core.PersistentTreeSet.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.PersistentTreeSet(this.meta, this.tree_map, this.__hash);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.PersistentTreeSet.EMPTY, this.meta);
};
cljs.core.__GT_PersistentTreeSet = function(a, b, c) {
  return new cljs.core.PersistentTreeSet(a, b, c);
};
cljs.core.PersistentTreeSet.EMPTY = new cljs.core.PersistentTreeSet(null, cljs.core.PersistentTreeMap.EMPTY, 0);
cljs.core.set_from_indexed_seq = function(a) {
  a = a.arr;
  a: {
    for (var b = 0, c = cljs.core._as_transient.call(null, cljs.core.PersistentHashSet.EMPTY);;) {
      if (b < a.length) {
        var d = b + 1, c = cljs.core._conj_BANG_.call(null, c, a[b]), b = d
      } else {
        a = c;
        break a;
      }
    }
    a = void 0;
  }
  return cljs.core._persistent_BANG_.call(null, a);
};
cljs.core.set = function(a) {
  a = cljs.core.seq.call(null, a);
  if (null == a) {
    return cljs.core.PersistentHashSet.EMPTY;
  }
  if (a instanceof cljs.core.IndexedSeq && 0 === a.i) {
    return cljs.core.set_from_indexed_seq.call(null, a);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    for (var b = cljs.core._as_transient.call(null, cljs.core.PersistentHashSet.EMPTY);;) {
      if (null != a) {
        var c = cljs.core._next.call(null, a), b = cljs.core._conj_BANG_.call(null, b, cljs.core._first.call(null, a));
        a = c;
      } else {
        return cljs.core._persistent_BANG_.call(null, b);
      }
    }
  } else {
    return null;
  }
};
cljs.core.hash_set = function() {
  var a = null, b = function() {
    return cljs.core.PersistentHashSet.EMPTY;
  }, c = function() {
    var a = function(a) {
      return cljs.core.set.call(null, a);
    }, b = function(b) {
      var c = null;
      0 < arguments.length && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return a.call(this, c);
    };
    b.cljs$lang$maxFixedArity = 0;
    b.cljs$lang$applyTo = function(b) {
      b = cljs.core.seq(b);
      return a(b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(cljs.core.array_seq(arguments, 0));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 0;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.sorted_set = function() {
  var a = function(a) {
    return cljs.core.reduce.call(null, cljs.core._conj, cljs.core.PersistentTreeSet.EMPTY, a);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.sorted_set_by = function() {
  var a = function(a, b) {
    return cljs.core.reduce.call(null, cljs.core._conj, new cljs.core.PersistentTreeSet(null, cljs.core.sorted_map_by.call(null, a), 0), b);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.replace = function(a, b) {
  if (cljs.core.vector_QMARK_.call(null, b)) {
    var c = cljs.core.count.call(null, b);
    return cljs.core.reduce.call(null, function(b, c) {
      var f = cljs.core.find.call(null, a, cljs.core.nth.call(null, b, c));
      return cljs.core.truth_(f) ? cljs.core.assoc.call(null, b, c, cljs.core.second.call(null, f)) : b;
    }, b, cljs.core.take.call(null, c, cljs.core.iterate.call(null, cljs.core.inc, 0)));
  }
  return cljs.core.map.call(null, function(b) {
    var c = cljs.core.find.call(null, a, b);
    return cljs.core.truth_(c) ? cljs.core.second.call(null, c) : b;
  }, b);
};
cljs.core.distinct = function(a) {
  return function c(a, e) {
    return new cljs.core.LazySeq(null, function() {
      return function(a, d) {
        for (;;) {
          var e = a, k = cljs.core.nth.call(null, e, 0, null);
          if (e = cljs.core.seq.call(null, e)) {
            if (cljs.core.contains_QMARK_.call(null, d, k)) {
              k = cljs.core.rest.call(null, e), e = d, a = k, d = e;
            } else {
              return cljs.core.cons.call(null, k, c.call(null, cljs.core.rest.call(null, e), cljs.core.conj.call(null, d, k)));
            }
          } else {
            return null;
          }
        }
      }.call(null, a, e);
    }, null, null);
  }.call(null, a, cljs.core.PersistentHashSet.EMPTY);
};
cljs.core.butlast = function(a) {
  for (var b = cljs.core.PersistentVector.EMPTY;;) {
    if (cljs.core.next.call(null, a)) {
      b = cljs.core.conj.call(null, b, cljs.core.first.call(null, a)), a = cljs.core.next.call(null, a);
    } else {
      return cljs.core.seq.call(null, b);
    }
  }
};
cljs.core.name = function(a) {
  if (a && (a.cljs$lang$protocol_mask$partition1$ & 4096 || a.cljs$core$INamed$)) {
    return cljs.core._name.call(null, a);
  }
  if ("string" === typeof a) {
    return a;
  }
  throw Error([cljs.core.str("Doesn't support name: "), cljs.core.str(a)].join(""));
};
cljs.core.zipmap = function(a, b) {
  for (var c = cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), d = cljs.core.seq.call(null, a), e = cljs.core.seq.call(null, b);;) {
    if (d && e) {
      c = cljs.core.assoc_BANG_.call(null, c, cljs.core.first.call(null, d), cljs.core.first.call(null, e)), d = cljs.core.next.call(null, d), e = cljs.core.next.call(null, e);
    } else {
      return cljs.core.persistent_BANG_.call(null, c);
    }
  }
};
cljs.core.max_key = function() {
  var a = null, b = function(a, b, c) {
    return a.call(null, b) > a.call(null, c) ? b : c;
  }, c = function() {
    var b = function(b, c, d, e) {
      return cljs.core.reduce.call(null, function(c, d) {
        return a.call(null, b, c, d);
      }, a.call(null, b, c, d), e);
    }, c = function(a, c, e, k) {
      var l = null;
      3 < arguments.length && (l = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return b.call(this, a, c, e, l);
    };
    c.cljs$lang$maxFixedArity = 3;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.next(a);
      var k = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, k, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f, g) {
    switch(arguments.length) {
      case 2:
        return e;
      case 3:
        return b.call(this, a, e, f);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, f, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return b;
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.min_key = function() {
  var a = null, b = function(a, b, c) {
    return a.call(null, b) < a.call(null, c) ? b : c;
  }, c = function() {
    var b = function(b, c, d, e) {
      return cljs.core.reduce.call(null, function(c, d) {
        return a.call(null, b, c, d);
      }, a.call(null, b, c, d), e);
    }, c = function(a, c, e, k) {
      var l = null;
      3 < arguments.length && (l = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return b.call(this, a, c, e, l);
    };
    c.cljs$lang$maxFixedArity = 3;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.next(a);
      var k = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, k, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f, g) {
    switch(arguments.length) {
      case 2:
        return e;
      case 3:
        return b.call(this, a, e, f);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, f, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
    return b;
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.partition_all = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, b, c);
  }, c = function(b, c, f) {
    return new cljs.core.LazySeq(null, function() {
      var g = cljs.core.seq.call(null, f);
      return g ? cljs.core.cons.call(null, cljs.core.take.call(null, b, g), a.call(null, b, c, cljs.core.drop.call(null, c, g))) : null;
    }, null, null);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.take_while = function take_while(b, c) {
  return new cljs.core.LazySeq(null, function() {
    var d = cljs.core.seq.call(null, c);
    return d ? cljs.core.truth_(b.call(null, cljs.core.first.call(null, d))) ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take_while.call(null, b, cljs.core.rest.call(null, d))) : null : null;
  }, null, null);
};
cljs.core.mk_bound_fn = function(a, b, c) {
  return function(d) {
    var e = cljs.core._comparator.call(null, a);
    return b.call(null, e.call(null, cljs.core._entry_key.call(null, a, d), c), 0);
  };
};
cljs.core.subseq = function() {
  var a = null, b = function(a, b, c) {
    var g = cljs.core.mk_bound_fn.call(null, a, b, c);
    return cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._GT_, cljs.core._GT__EQ_], !0).call(null, b)) ? (a = cljs.core._sorted_seq_from.call(null, a, c, !0), cljs.core.truth_(a) ? (b = cljs.core.nth.call(null, a, 0, null), cljs.core.truth_(g.call(null, b)) ? a : cljs.core.next.call(null, a)) : null) : cljs.core.take_while.call(null, g, cljs.core._sorted_seq.call(null, a, !0));
  }, c = function(a, b, c, g, h) {
    var k = cljs.core._sorted_seq_from.call(null, a, c, !0);
    if (cljs.core.truth_(k)) {
      var l = cljs.core.nth.call(null, k, 0, null);
      return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, a, g, h), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, a, b, c).call(null, l)) ? k : cljs.core.next.call(null, k));
    }
    return null;
  }, a = function(a, e, f, g, h) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 5:
        return c.call(this, a, e, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$5 = c;
  return a;
}();
cljs.core.rsubseq = function() {
  var a = null, b = function(a, b, c) {
    var g = cljs.core.mk_bound_fn.call(null, a, b, c);
    return cljs.core.truth_(cljs.core.PersistentHashSet.fromArray([cljs.core._LT_, cljs.core._LT__EQ_], !0).call(null, b)) ? (a = cljs.core._sorted_seq_from.call(null, a, c, !1), cljs.core.truth_(a) ? (b = cljs.core.nth.call(null, a, 0, null), cljs.core.truth_(g.call(null, b)) ? a : cljs.core.next.call(null, a)) : null) : cljs.core.take_while.call(null, g, cljs.core._sorted_seq.call(null, a, !1));
  }, c = function(a, b, c, g, h) {
    var k = cljs.core._sorted_seq_from.call(null, a, h, !1);
    if (cljs.core.truth_(k)) {
      var l = cljs.core.nth.call(null, k, 0, null);
      return cljs.core.take_while.call(null, cljs.core.mk_bound_fn.call(null, a, b, c), cljs.core.truth_(cljs.core.mk_bound_fn.call(null, a, g, h).call(null, l)) ? k : cljs.core.next.call(null, k));
    }
    return null;
  }, a = function(a, e, f, g, h) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 5:
        return c.call(this, a, e, f, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$5 = c;
  return a;
}();
cljs.core.Range = function(a, b, c, d, e) {
  this.meta = a;
  this.start = b;
  this.end = c;
  this.step = d;
  this.__hash = e;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 32375006;
};
cljs.core.Range.cljs$lang$type = !0;
cljs.core.Range.cljs$lang$ctorStr = "cljs.core/Range";
cljs.core.Range.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Range");
};
cljs.core.Range.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  a = this.__hash;
  return null != a ? a : this.__hash = a = cljs.core.hash_coll.call(null, this);
};
cljs.core.Range.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return 0 < this.step ? this.start + this.step < this.end ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : null : this.start + this.step > this.end ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : null;
};
cljs.core.Range.prototype.cljs$core$ICollection$_conj$arity$2 = function(a, b) {
  return cljs.core.cons.call(null, b, this);
};
cljs.core.Range.prototype.toString = function() {
  return cljs.core.pr_str_STAR_.call(null, this);
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$2 = function(a, b) {
  return cljs.core.ci_reduce.call(null, this, b);
};
cljs.core.Range.prototype.cljs$core$IReduce$_reduce$arity$3 = function(a, b, c) {
  return cljs.core.ci_reduce.call(null, this, b, c);
};
cljs.core.Range.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return 0 < this.step ? this.start < this.end ? this : null : this.start > this.end ? this : null;
};
cljs.core.Range.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return cljs.core.not.call(null, cljs.core._seq.call(null, this)) ? 0 : Math.ceil((this.end - this.start) / this.step);
};
cljs.core.Range.prototype.cljs$core$ISeq$_first$arity$1 = function(a) {
  return null == cljs.core._seq.call(null, this) ? null : this.start;
};
cljs.core.Range.prototype.cljs$core$ISeq$_rest$arity$1 = function(a) {
  return null != cljs.core._seq.call(null, this) ? new cljs.core.Range(this.meta, this.start + this.step, this.end, this.step, null) : cljs.core.List.EMPTY;
};
cljs.core.Range.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return cljs.core.equiv_sequential.call(null, this, b);
};
cljs.core.Range.prototype.cljs$core$IWithMeta$_with_meta$arity$2 = function(a, b) {
  return new cljs.core.Range(b, this.start, this.end, this.step, this.__hash);
};
cljs.core.Range.prototype.cljs$core$ICloneable$ = !0;
cljs.core.Range.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.Range(this.meta, this.start, this.end, this.step, this.__hash);
};
cljs.core.Range.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  if (b < cljs.core._count.call(null, this)) {
    return this.start + b * this.step;
  }
  if (this.start > this.end && 0 === this.step) {
    return this.start;
  }
  throw Error("Index out of bounds");
};
cljs.core.Range.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  return b < cljs.core._count.call(null, this) ? this.start + b * this.step : this.start > this.end && 0 === this.step ? this.start : c;
};
cljs.core.Range.prototype.cljs$core$IEmptyableCollection$_empty$arity$1 = function(a) {
  return cljs.core.with_meta.call(null, cljs.core.List.EMPTY, this.meta);
};
cljs.core.__GT_Range = function(a, b, c, d, e) {
  return new cljs.core.Range(a, b, c, d, e);
};
cljs.core.range = function() {
  var a = null, b = function() {
    return a.call(null, 0, Number.MAX_VALUE, 1);
  }, c = function(b) {
    return a.call(null, 0, b, 1);
  }, d = function(b, c) {
    return a.call(null, b, c, 1);
  }, e = function(a, b, c) {
    return new cljs.core.Range(null, a, b, c, null);
  }, a = function(a, g, h) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
      case 2:
        return d.call(this, a, g);
      case 3:
        return e.call(this, a, g, h);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  a.cljs$core$IFn$_invoke$arity$2 = d;
  a.cljs$core$IFn$_invoke$arity$3 = e;
  return a;
}();
cljs.core.take_nth = function take_nth(b, c) {
  return new cljs.core.LazySeq(null, function() {
    var d = cljs.core.seq.call(null, c);
    return d ? cljs.core.cons.call(null, cljs.core.first.call(null, d), take_nth.call(null, b, cljs.core.drop.call(null, b, d))) : null;
  }, null, null);
};
cljs.core.split_with = function(a, b) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.take_while.call(null, a, b), cljs.core.drop_while.call(null, a, b)], null);
};
cljs.core.partition_by = function partition_by(b, c) {
  return new cljs.core.LazySeq(null, function() {
    var d = cljs.core.seq.call(null, c);
    if (d) {
      var e = cljs.core.first.call(null, d), f = b.call(null, e), e = cljs.core.cons.call(null, e, cljs.core.take_while.call(null, function(c, d) {
        return function(c) {
          return cljs.core._EQ_.call(null, d, b.call(null, c));
        };
      }(e, f), cljs.core.next.call(null, d)));
      return cljs.core.cons.call(null, e, partition_by.call(null, b, cljs.core.seq.call(null, cljs.core.drop.call(null, cljs.core.count.call(null, e), d))));
    }
    return null;
  }, null, null);
};
cljs.core.frequencies = function(a) {
  return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(a, c) {
    return cljs.core.assoc_BANG_.call(null, a, c, cljs.core.get.call(null, a, c, 0) + 1);
  }, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), a));
};
cljs.core.reductions = function() {
  var a = null, b = function(b, c) {
    return new cljs.core.LazySeq(null, function() {
      var f = cljs.core.seq.call(null, c);
      return f ? a.call(null, b, cljs.core.first.call(null, f), cljs.core.rest.call(null, f)) : cljs.core._conj.call(null, cljs.core.List.EMPTY, b.call(null));
    }, null, null);
  }, c = function(b, c, f) {
    return cljs.core.cons.call(null, c, new cljs.core.LazySeq(null, function() {
      var g = cljs.core.seq.call(null, f);
      return g ? a.call(null, b, b.call(null, c, cljs.core.first.call(null, g)), cljs.core.rest.call(null, g)) : null;
    }, null, null));
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.juxt = function() {
  var a = null, b = function(a) {
    return function() {
      var b = null, c = function() {
        var b = function(b, c, d, e) {
          return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, a, b, c, d, e)], null);
        }, c = function(a, c, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return b.call(this, a, c, d, f);
        };
        c.cljs$lang$maxFixedArity = 3;
        c.cljs$lang$applyTo = function(a) {
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return b(c, d, e, a);
        };
        c.cljs$core$IFn$_invoke$arity$variadic = b;
        return c;
      }(), b = function(b, d, e, g) {
        switch(arguments.length) {
          case 0:
            return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null)], null);
          case 1:
            return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, b)], null);
          case 2:
            return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, b, d)], null);
          case 3:
            return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, b, d, e)], null);
          default:
            return c.cljs$core$IFn$_invoke$arity$variadic(b, d, e, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      b.cljs$lang$maxFixedArity = 3;
      b.cljs$lang$applyTo = c.cljs$lang$applyTo;
      return b;
    }();
  }, c = function(a, b) {
    return function() {
      var c = null, d = function() {
        var c = function(c, d, e, h) {
          return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, a, c, d, e, h), cljs.core.apply.call(null, b, c, d, e, h)], null);
        }, d = function(a, b, d, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return c.call(this, a, b, d, f);
        };
        d.cljs$lang$maxFixedArity = 3;
        d.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var d = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return c(b, d, e, a);
        };
        d.cljs$core$IFn$_invoke$arity$variadic = c;
        return d;
      }(), c = function(c, e, h, p) {
        switch(arguments.length) {
          case 0:
            return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null), b.call(null)], null);
          case 1:
            return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, c), b.call(null, c)], null);
          case 2:
            return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, c, e), b.call(null, c, e)], null);
          case 3:
            return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, c, e, h), b.call(null, c, e, h)], null);
          default:
            return d.cljs$core$IFn$_invoke$arity$variadic(c, e, h, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      c.cljs$lang$maxFixedArity = 3;
      c.cljs$lang$applyTo = d.cljs$lang$applyTo;
      return c;
    }();
  }, d = function(a, b, c) {
    return function() {
      var d = null, e = function() {
        var d = function(d, e, k, l) {
          return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.apply.call(null, a, d, e, k, l), cljs.core.apply.call(null, b, d, e, k, l), cljs.core.apply.call(null, c, d, e, k, l)], null);
        }, e = function(a, b, c, e) {
          var f = null;
          3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
          return d.call(this, a, b, c, f);
        };
        e.cljs$lang$maxFixedArity = 3;
        e.cljs$lang$applyTo = function(a) {
          var b = cljs.core.first(a);
          a = cljs.core.next(a);
          var c = cljs.core.first(a);
          a = cljs.core.next(a);
          var e = cljs.core.first(a);
          a = cljs.core.rest(a);
          return d(b, c, e, a);
        };
        e.cljs$core$IFn$_invoke$arity$variadic = d;
        return e;
      }(), d = function(d, k, p, q) {
        switch(arguments.length) {
          case 0:
            return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null), b.call(null), c.call(null)], null);
          case 1:
            return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, d), b.call(null, d), c.call(null, d)], null);
          case 2:
            return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, d, k), b.call(null, d, k), c.call(null, d, k)], null);
          case 3:
            return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.call(null, d, k, p), b.call(null, d, k, p), c.call(null, d, k, p)], null);
          default:
            return e.cljs$core$IFn$_invoke$arity$variadic(d, k, p, cljs.core.array_seq(arguments, 3));
        }
        throw Error("Invalid arity: " + arguments.length);
      };
      d.cljs$lang$maxFixedArity = 3;
      d.cljs$lang$applyTo = e.cljs$lang$applyTo;
      return d;
    }();
  }, e = function() {
    var a = function(a, b, c, d) {
      var e = cljs.core.list_STAR_.call(null, a, b, c, d);
      return function() {
        var a = null, b = function() {
          return cljs.core.reduce.call(null, function(a, b) {
            return cljs.core.conj.call(null, a, b.call(null));
          }, cljs.core.PersistentVector.EMPTY, e);
        }, c = function(a) {
          return cljs.core.reduce.call(null, function(b, c) {
            return cljs.core.conj.call(null, b, c.call(null, a));
          }, cljs.core.PersistentVector.EMPTY, e);
        }, d = function(a, b) {
          return cljs.core.reduce.call(null, function(c, d) {
            return cljs.core.conj.call(null, c, d.call(null, a, b));
          }, cljs.core.PersistentVector.EMPTY, e);
        }, f = function(a, b, c) {
          return cljs.core.reduce.call(null, function(d, e) {
            return cljs.core.conj.call(null, d, e.call(null, a, b, c));
          }, cljs.core.PersistentVector.EMPTY, e);
        }, g = function() {
          var a = function(a, b, c, d) {
            return cljs.core.reduce.call(null, function(e, f) {
              return cljs.core.conj.call(null, e, cljs.core.apply.call(null, f, a, b, c, d));
            }, cljs.core.PersistentVector.EMPTY, e);
          }, b = function(b, c, d, e) {
            var f = null;
            3 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
            return a.call(this, b, c, d, f);
          };
          b.cljs$lang$maxFixedArity = 3;
          b.cljs$lang$applyTo = function(b) {
            var c = cljs.core.first(b);
            b = cljs.core.next(b);
            var d = cljs.core.first(b);
            b = cljs.core.next(b);
            var e = cljs.core.first(b);
            b = cljs.core.rest(b);
            return a(c, d, e, b);
          };
          b.cljs$core$IFn$_invoke$arity$variadic = a;
          return b;
        }(), a = function(a, e, h, k) {
          switch(arguments.length) {
            case 0:
              return b.call(this);
            case 1:
              return c.call(this, a);
            case 2:
              return d.call(this, a, e);
            case 3:
              return f.call(this, a, e, h);
            default:
              return g.cljs$core$IFn$_invoke$arity$variadic(a, e, h, cljs.core.array_seq(arguments, 3));
          }
          throw Error("Invalid arity: " + arguments.length);
        };
        a.cljs$lang$maxFixedArity = 3;
        a.cljs$lang$applyTo = g.cljs$lang$applyTo;
        return a;
      }();
    }, b = function(b, c, d, e) {
      var g = null;
      3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
      return a.call(this, b, c, d, g);
    };
    b.cljs$lang$maxFixedArity = 3;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, g, h, k) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, g);
      case 3:
        return d.call(this, a, g, h);
      default:
        return e.cljs$core$IFn$_invoke$arity$variadic(a, g, h, cljs.core.array_seq(arguments, 3));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 3;
  a.cljs$lang$applyTo = e.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  a.cljs$core$IFn$_invoke$arity$variadic = e.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.dorun = function() {
  var a = null, b = function(a) {
    for (;;) {
      if (cljs.core.seq.call(null, a)) {
        a = cljs.core.next.call(null, a);
      } else {
        return null;
      }
    }
  }, c = function(a, b) {
    for (;;) {
      if (cljs.core.seq.call(null, b) && 0 < a) {
        var c = a - 1, g = cljs.core.next.call(null, b);
        a = c;
        b = g;
      } else {
        return null;
      }
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.doall = function() {
  var a = null, b = function(a) {
    cljs.core.dorun.call(null, a);
    return a;
  }, c = function(a, b) {
    cljs.core.dorun.call(null, a, b);
    return b;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.regexp_QMARK_ = function(a) {
  return a instanceof RegExp;
};
cljs.core.re_matches = function(a, b) {
  var c = a.exec(b);
  return cljs.core._EQ_.call(null, cljs.core.first.call(null, c), b) ? 1 === cljs.core.count.call(null, c) ? cljs.core.first.call(null, c) : cljs.core.vec.call(null, c) : null;
};
cljs.core.re_find = function(a, b) {
  var c = a.exec(b);
  return null == c ? null : 1 === cljs.core.count.call(null, c) ? cljs.core.first.call(null, c) : cljs.core.vec.call(null, c);
};
cljs.core.re_seq = function re_seq(b, c) {
  var d = cljs.core.re_find.call(null, b, c), e = c.search(b), f = cljs.core.coll_QMARK_.call(null, d) ? cljs.core.first.call(null, d) : d, g = cljs.core.subs.call(null, c, e + cljs.core.count.call(null, f));
  return cljs.core.truth_(d) ? new cljs.core.LazySeq(null, function() {
    return cljs.core.cons.call(null, d, cljs.core.seq.call(null, g) ? re_seq.call(null, b, g) : null);
  }, null, null) : null;
};
cljs.core.re_pattern = function(a) {
  var b = cljs.core.re_find.call(null, /^(?:\(\?([idmsux]*)\))?(.*)/, a);
  cljs.core.nth.call(null, b, 0, null);
  a = cljs.core.nth.call(null, b, 1, null);
  b = cljs.core.nth.call(null, b, 2, null);
  return RegExp(b, a);
};
cljs.core.pr_sequential_writer = function(a, b, c, d, e, f, g) {
  var h = cljs.core._STAR_print_level_STAR_;
  try {
    cljs.core._STAR_print_level_STAR_ = null == cljs.core._STAR_print_level_STAR_ ? null : cljs.core._STAR_print_level_STAR_ - 1;
    if (null != cljs.core._STAR_print_level_STAR_ && 0 > cljs.core._STAR_print_level_STAR_) {
      return cljs.core._write.call(null, a, "#");
    }
    cljs.core._write.call(null, a, c);
    cljs.core.seq.call(null, g) && b.call(null, cljs.core.first.call(null, g), a, f);
    for (var k = cljs.core.next.call(null, g), l = (new cljs.core.Keyword(null, "print-length", "print-length", 3960797560)).cljs$core$IFn$_invoke$arity$1(f);k && (null == l || 0 !== l);) {
      cljs.core._write.call(null, a, d);
      b.call(null, cljs.core.first.call(null, k), a, f);
      var m = cljs.core.next.call(null, k);
      c = l - 1;
      k = m;
      l = c;
    }
    cljs.core.truth_((new cljs.core.Keyword(null, "print-length", "print-length", 3960797560)).cljs$core$IFn$_invoke$arity$1(f)) && (cljs.core._write.call(null, a, d), b.call(null, "...", a, f));
    return cljs.core._write.call(null, a, e);
  } finally {
    cljs.core._STAR_print_level_STAR_ = h;
  }
};
cljs.core.write_all = function() {
  var a = function(a, b) {
    for (var e = cljs.core.seq.call(null, b), f = null, g = 0, h = 0;;) {
      if (h < g) {
        var k = cljs.core._nth.call(null, f, h);
        cljs.core._write.call(null, a, k);
        h += 1;
      } else {
        if (e = cljs.core.seq.call(null, e)) {
          f = e, cljs.core.chunked_seq_QMARK_.call(null, f) ? (e = cljs.core.chunk_first.call(null, f), g = cljs.core.chunk_rest.call(null, f), f = e, k = cljs.core.count.call(null, e), e = g, g = k) : (k = cljs.core.first.call(null, f), cljs.core._write.call(null, a, k), e = cljs.core.next.call(null, f), f = null, g = 0), h = 0;
        } else {
          return null;
        }
      }
    }
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.string_print = function(a) {
  cljs.core._STAR_print_fn_STAR_.call(null, a);
  return null;
};
cljs.core.flush = function() {
  return null;
};
cljs.core.char_escapes = function() {
  return{'"':'\\"', "\\":"\\\\", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t"};
}();
cljs.core.quote_string = function(a) {
  return[cljs.core.str('"'), cljs.core.str(a.replace(RegExp('[\\\\"\b\f\n\r\t]', "g"), function(a) {
    return cljs.core.char_escapes[a];
  })), cljs.core.str('"')].join("");
};
cljs.core.pr_writer = function pr_writer(b, c, d) {
  if (null == b) {
    return cljs.core._write.call(null, c, "nil");
  }
  if (void 0 === b) {
    return cljs.core._write.call(null, c, "#\x3cundefined\x3e");
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    cljs.core.truth_(function() {
      var c = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "meta", "meta", 1017252215));
      return cljs.core.truth_(c) ? (c = b ? b.cljs$lang$protocol_mask$partition0$ & 131072 || b.cljs$core$IMeta$ ? !0 : b.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMeta, b) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IMeta, b)) ? cljs.core.meta.call(null, b) : c : c;
    }()) && (cljs.core._write.call(null, c, "^"), pr_writer.call(null, cljs.core.meta.call(null, b), c, d), cljs.core._write.call(null, c, " "));
    if (null == b) {
      return cljs.core._write.call(null, c, "nil");
    }
    if (b.cljs$lang$type) {
      return b.cljs$lang$ctorPrWriter(b, c, d);
    }
    if (b && (b.cljs$lang$protocol_mask$partition0$ & 2147483648 || b.cljs$core$IPrintWithWriter$)) {
      return cljs.core._pr_writer.call(null, b, c, d);
    }
    if (cljs.core.type.call(null, b) === Boolean || "number" === typeof b) {
      return cljs.core._write.call(null, c, "" + cljs.core.str(b));
    }
    if (cljs.core.object_QMARK_.call(null, b)) {
      return cljs.core._write.call(null, c, "#js "), cljs.core.print_map.call(null, cljs.core.map.call(null, function(c) {
        return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, c), b[c]], null);
      }, cljs.core.js_keys.call(null, b)), pr_writer, c, d);
    }
    if (b instanceof Array) {
      return cljs.core.pr_sequential_writer.call(null, c, pr_writer, "#js [", " ", "]", d, b);
    }
    if (goog.isString(b)) {
      return cljs.core.truth_((new cljs.core.Keyword(null, "readably", "readably", 4441712502)).cljs$core$IFn$_invoke$arity$1(d)) ? cljs.core._write.call(null, c, cljs.core.quote_string.call(null, b)) : cljs.core._write.call(null, c, b);
    }
    if (cljs.core.fn_QMARK_.call(null, b)) {
      return cljs.core.write_all.call(null, c, "#\x3c", "" + cljs.core.str(b), "\x3e");
    }
    if (b instanceof Date) {
      var e = function(b, c) {
        for (var d = "" + cljs.core.str(b);;) {
          if (cljs.core.count.call(null, d) < c) {
            d = [cljs.core.str("0"), cljs.core.str(d)].join("");
          } else {
            return d;
          }
        }
      };
      return cljs.core.write_all.call(null, c, '#inst "', "" + cljs.core.str(b.getUTCFullYear()), "-", e.call(null, b.getUTCMonth() + 1, 2), "-", e.call(null, b.getUTCDate(), 2), "T", e.call(null, b.getUTCHours(), 2), ":", e.call(null, b.getUTCMinutes(), 2), ":", e.call(null, b.getUTCSeconds(), 2), ".", e.call(null, b.getUTCMilliseconds(), 3), "-", '00:00"');
    }
    return cljs.core.regexp_QMARK_.call(null, b) ? cljs.core.write_all.call(null, c, '#"', b.source, '"') : (b ? b.cljs$lang$protocol_mask$partition0$ & 2147483648 || b.cljs$core$IPrintWithWriter$ || (b.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IPrintWithWriter, b)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IPrintWithWriter, b)) ? cljs.core._pr_writer.call(null, b, c, d) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? 
    cljs.core.write_all.call(null, c, "#\x3c", "" + cljs.core.str(b), "\x3e") : null;
  }
  return null;
};
cljs.core.pr_seq_writer = function(a, b, c) {
  cljs.core.pr_writer.call(null, cljs.core.first.call(null, a), b, c);
  a = cljs.core.seq.call(null, cljs.core.next.call(null, a));
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      cljs.core._write.call(null, b, " ");
      cljs.core.pr_writer.call(null, g, b, c);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        d = a, cljs.core.chunked_seq_QMARK_.call(null, d) ? (a = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = a, g = cljs.core.count.call(null, a), a = e, e = g) : (g = cljs.core.first.call(null, d), cljs.core._write.call(null, b, " "), cljs.core.pr_writer.call(null, g, b, c), a = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
cljs.core.pr_sb_with_opts = function(a, b) {
  var c = new goog.string.StringBuffer, d = new cljs.core.StringBufferWriter(c);
  cljs.core.pr_seq_writer.call(null, a, d, b);
  cljs.core._flush.call(null, d);
  return c;
};
cljs.core.pr_str_with_opts = function(a, b) {
  return cljs.core.empty_QMARK_.call(null, a) ? "" : "" + cljs.core.str(cljs.core.pr_sb_with_opts.call(null, a, b));
};
cljs.core.prn_str_with_opts = function(a, b) {
  if (cljs.core.empty_QMARK_.call(null, a)) {
    return "\n";
  }
  var c = cljs.core.pr_sb_with_opts.call(null, a, b);
  c.append("\n");
  return "" + cljs.core.str(c);
};
cljs.core.pr_with_opts = function(a, b) {
  return cljs.core.string_print.call(null, cljs.core.pr_str_with_opts.call(null, a, b));
};
cljs.core.newline = function(a) {
  cljs.core.string_print.call(null, "\n");
  return cljs.core.truth_(cljs.core.get.call(null, a, new cljs.core.Keyword(null, "flush-on-newline", "flush-on-newline", 4338025857))) ? cljs.core.flush.call(null) : null;
};
cljs.core.pr_str = function() {
  var a = function(a) {
    return cljs.core.pr_str_with_opts.call(null, a, cljs.core.pr_opts.call(null));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.prn_str = function() {
  var a = function(a) {
    return cljs.core.prn_str_with_opts.call(null, a, cljs.core.pr_opts.call(null));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.pr = function() {
  var a = function(a) {
    return cljs.core.pr_with_opts.call(null, a, cljs.core.pr_opts.call(null));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.print = function() {
  var a = function(a) {
    return cljs.core.pr_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), new cljs.core.Keyword(null, "readably", "readably", 4441712502), !1));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.print_str = function() {
  var a = function(a) {
    return cljs.core.pr_str_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), new cljs.core.Keyword(null, "readably", "readably", 4441712502), !1));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.println = function() {
  var a = function(a) {
    cljs.core.pr_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), new cljs.core.Keyword(null, "readably", "readably", 4441712502), !1));
    return cljs.core.truth_(cljs.core._STAR_print_newline_STAR_) ? cljs.core.newline.call(null, cljs.core.pr_opts.call(null)) : null;
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.println_str = function() {
  var a = function(a) {
    return cljs.core.prn_str_with_opts.call(null, a, cljs.core.assoc.call(null, cljs.core.pr_opts.call(null), new cljs.core.Keyword(null, "readably", "readably", 4441712502), !1));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.prn = function() {
  var a = function(a) {
    cljs.core.pr_with_opts.call(null, a, cljs.core.pr_opts.call(null));
    return cljs.core.truth_(cljs.core._STAR_print_newline_STAR_) ? cljs.core.newline.call(null, cljs.core.pr_opts.call(null)) : null;
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.print_map = function(a, b, c, d) {
  return cljs.core.pr_sequential_writer.call(null, c, function(a, c, d) {
    b.call(null, cljs.core.key.call(null, a), c, d);
    cljs.core._write.call(null, c, " ");
    return b.call(null, cljs.core.val.call(null, a), c, d);
  }, "{", ", ", "}", d, cljs.core.seq.call(null, a));
};
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.KeySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.IndexedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Subvec.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, this);
};
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ChunkedCons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.print_map.call(null, this, cljs.core.pr_writer, b, c);
};
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentArrayMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.print_map.call(null, this, cljs.core.pr_writer, b, c);
};
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentQueue.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#queue [", " ", "]", c, cljs.core.seq.call(null, this));
};
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.LazySeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.RSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#{", " ", "}", c, this);
};
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.NodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.RedNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, this);
};
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ChunkedSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentHashMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.print_map.call(null, this, cljs.core.pr_writer, b, c);
};
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentHashSet.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "#{", " ", "}", c, this);
};
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, this);
};
cljs.core.List.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.List.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentArrayMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.EmptyList.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, "()");
};
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.BlackNode.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "[", " ", "]", c, this);
};
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Cons.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.Range.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ArrayNodeSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ValSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.ObjMap.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.print_map.call(null, this, cljs.core.pr_writer, b, c);
};
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$ = !0;
cljs.core.PersistentTreeMapSeq.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core.pr_sequential_writer.call(null, b, cljs.core.pr_writer, "(", " ", ")", c, this);
};
cljs.core.PersistentVector.prototype.cljs$core$IComparable$ = !0;
cljs.core.PersistentVector.prototype.cljs$core$IComparable$_compare$arity$2 = function(a, b) {
  return cljs.core.compare_indexed.call(null, this, b);
};
cljs.core.Subvec.prototype.cljs$core$IComparable$ = !0;
cljs.core.Subvec.prototype.cljs$core$IComparable$_compare$arity$2 = function(a, b) {
  return cljs.core.compare_indexed.call(null, this, b);
};
cljs.core.Keyword.prototype.cljs$core$IComparable$ = !0;
cljs.core.Keyword.prototype.cljs$core$IComparable$_compare$arity$2 = function(a, b) {
  return cljs.core.compare_symbols.call(null, this, b);
};
cljs.core.Symbol.prototype.cljs$core$IComparable$ = !0;
cljs.core.Symbol.prototype.cljs$core$IComparable$_compare$arity$2 = function(a, b) {
  return cljs.core.compare_symbols.call(null, this, b);
};
cljs.core.Atom = function(a, b, c, d) {
  this.state = a;
  this.meta = b;
  this.validator = c;
  this.watches = d;
  this.cljs$lang$protocol_mask$partition0$ = 2153938944;
  this.cljs$lang$protocol_mask$partition1$ = 2;
};
cljs.core.Atom.cljs$lang$type = !0;
cljs.core.Atom.cljs$lang$ctorStr = "cljs.core/Atom";
cljs.core.Atom.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Atom");
};
cljs.core.Atom.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return goog.getUid(this);
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
  a = cljs.core.seq.call(null, this.watches);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      g.call(null, h, this, b, c);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, a), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), g.call(null, h, this, b, c), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
  return this.watches = cljs.core.assoc.call(null, this.watches, b, c);
};
cljs.core.Atom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
  return this.watches = cljs.core.dissoc.call(null, this.watches, b);
};
cljs.core.Atom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  cljs.core._write.call(null, b, "#\x3cAtom: ");
  cljs.core.pr_writer.call(null, this.state, b, c);
  return cljs.core._write.call(null, b, "\x3e");
};
cljs.core.Atom.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
cljs.core.Atom.prototype.cljs$core$IDeref$_deref$arity$1 = function(a) {
  return this.state;
};
cljs.core.Atom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return this === b;
};
cljs.core.__GT_Atom = function(a, b, c, d) {
  return new cljs.core.Atom(a, b, c, d);
};
cljs.core.atom = function() {
  var a = null, b = function(a) {
    return new cljs.core.Atom(a, null, null, null);
  }, c = function() {
    var a = function(a, b) {
      var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "validator", "validator", 4199087812)), c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "meta", "meta", 1017252215));
      return new cljs.core.Atom(a, c, d, null);
    }, b = function(b, c) {
      var e = null;
      1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return a.call(this, b, e);
    };
    b.cljs$lang$maxFixedArity = 1;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, cljs.core.array_seq(arguments, 1));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 1;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.reset_BANG_ = function(a, b) {
  var c = a.validator;
  if (null != c && !cljs.core.truth_(c.call(null, b))) {
    throw Error([cljs.core.str("Assert failed: "), cljs.core.str("Validator rejected reference state"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "validate", "validate", 1233162959, null), new cljs.core.Symbol(null, "new-value", "new-value", 972165309, null))))].join(""));
  }
  c = a.state;
  a.state = b;
  null != a.watches && cljs.core._notify_watches.call(null, a, c, b);
  return b;
};
cljs.core.swap_BANG_ = function() {
  var a = null, b = function(a, b) {
    return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state));
  }, c = function(a, b, c) {
    return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c));
  }, d = function(a, b, c, d) {
    return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c, d));
  }, e = function(a, b, c, d, e) {
    return cljs.core.reset_BANG_.call(null, a, b.call(null, a.state, c, d, e));
  }, f = function() {
    var a = function(a, b, c, d, e, f) {
      return cljs.core.reset_BANG_.call(null, a, cljs.core.apply.call(null, b, a.state, c, d, e, f));
    }, b = function(b, c, d, e, f, h) {
      var r = null;
      5 < arguments.length && (r = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
      return a.call(this, b, c, d, e, f, r);
    };
    b.cljs$lang$maxFixedArity = 5;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var f = cljs.core.first(b);
      b = cljs.core.next(b);
      var h = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, f, h, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, h, k, l, m, n) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, h);
      case 3:
        return c.call(this, a, h, k);
      case 4:
        return d.call(this, a, h, k, l);
      case 5:
        return e.call(this, a, h, k, l, m);
      default:
        return f.cljs$core$IFn$_invoke$arity$variadic(a, h, k, l, m, cljs.core.array_seq(arguments, 5));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 5;
  a.cljs$lang$applyTo = f.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$5 = e;
  a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.compare_and_set_BANG_ = function(a, b, c) {
  return cljs.core._EQ_.call(null, a.state, b) ? (cljs.core.reset_BANG_.call(null, a, c), !0) : !1;
};
cljs.core.deref = function(a) {
  return cljs.core._deref.call(null, a);
};
cljs.core.set_validator_BANG_ = function(a, b) {
  return a.validator = b;
};
cljs.core.get_validator = function(a) {
  return a.validator;
};
cljs.core.alter_meta_BANG_ = function() {
  var a = function(a, b, e) {
    return a.meta = cljs.core.apply.call(null, b, a.meta, e);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.reset_meta_BANG_ = function(a, b) {
  return a.meta = b;
};
cljs.core.add_watch = function(a, b, c) {
  return cljs.core._add_watch.call(null, a, b, c);
};
cljs.core.remove_watch = function(a, b) {
  return cljs.core._remove_watch.call(null, a, b);
};
cljs.core.gensym_counter = null;
cljs.core.gensym = function() {
  var a = null, b = function() {
    return a.call(null, "G__");
  }, c = function(a) {
    null == cljs.core.gensym_counter && (cljs.core.gensym_counter = cljs.core.atom.call(null, 0));
    return cljs.core.symbol.call(null, [cljs.core.str(a), cljs.core.str(cljs.core.swap_BANG_.call(null, cljs.core.gensym_counter, cljs.core.inc))].join(""));
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
cljs.core.fixture1 = 1;
cljs.core.fixture2 = 2;
cljs.core.Delay = function(a, b) {
  this.state = a;
  this.f = b;
  this.cljs$lang$protocol_mask$partition1$ = 1;
  this.cljs$lang$protocol_mask$partition0$ = 32768;
};
cljs.core.Delay.cljs$lang$type = !0;
cljs.core.Delay.cljs$lang$ctorStr = "cljs.core/Delay";
cljs.core.Delay.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/Delay");
};
cljs.core.Delay.prototype.cljs$core$IPending$_realized_QMARK_$arity$1 = function(a) {
  return(new cljs.core.Keyword(null, "done", "done", 1016993524)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, this.state));
};
cljs.core.Delay.prototype.cljs$core$IDeref$_deref$arity$1 = function(a) {
  var b = this;
  return(new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(cljs.core.swap_BANG_.call(null, b.state, function(a) {
    a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
    var d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "done", "done", 1016993524));
    return cljs.core.truth_(d) ? a : new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "done", "done", 1016993524), !0, new cljs.core.Keyword(null, "value", "value", 1125876963), b.f.call(null)], null);
  }));
};
cljs.core.__GT_Delay = function(a, b) {
  return new cljs.core.Delay(a, b);
};
cljs.core.delay_QMARK_ = function(a) {
  return a instanceof cljs.core.Delay;
};
cljs.core.force = function(a) {
  return cljs.core.delay_QMARK_.call(null, a) ? cljs.core.deref.call(null, a) : a;
};
cljs.core.realized_QMARK_ = function(a) {
  return cljs.core._realized_QMARK_.call(null, a);
};
cljs.core.IEncodeJS = function() {
  return{};
}();
cljs.core._clj__GT_js = function(a) {
  if (a ? a.cljs$core$IEncodeJS$_clj__GT_js$arity$1 : a) {
    return a.cljs$core$IEncodeJS$_clj__GT_js$arity$1(a);
  }
  var b;
  b = cljs.core._clj__GT_js[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._clj__GT_js._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IEncodeJS.-clj-\x3ejs", a);
  }
  return b.call(null, a);
};
cljs.core._key__GT_js = function(a) {
  if (a ? a.cljs$core$IEncodeJS$_key__GT_js$arity$1 : a) {
    return a.cljs$core$IEncodeJS$_key__GT_js$arity$1(a);
  }
  var b;
  b = cljs.core._key__GT_js[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._key__GT_js._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IEncodeJS.-key-\x3ejs", a);
  }
  return b.call(null, a);
};
cljs.core.key__GT_js = function(a) {
  return(a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.cljs$core$IEncodeJS$) || (a.cljs$lang$protocol_mask$partition$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeJS, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeJS, a)) ? cljs.core._clj__GT_js.call(null, a) : "string" === typeof a || "number" === typeof a || a instanceof cljs.core.Keyword || a instanceof cljs.core.Symbol ? cljs.core.clj__GT_js.call(null, a) : cljs.core.pr_str.call(null, a);
};
cljs.core.clj__GT_js = function clj__GT_js(b) {
  if (null == b) {
    return null;
  }
  if (b ? cljs.core.truth_(cljs.core.truth_(null) ? null : b.cljs$core$IEncodeJS$) || (b.cljs$lang$protocol_mask$partition$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeJS, b)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeJS, b)) {
    return cljs.core._clj__GT_js.call(null, b);
  }
  if (b instanceof cljs.core.Keyword) {
    return cljs.core.name.call(null, b);
  }
  if (b instanceof cljs.core.Symbol) {
    return "" + cljs.core.str(b);
  }
  if (cljs.core.map_QMARK_.call(null, b)) {
    var c = {};
    b = cljs.core.seq.call(null, b);
    for (var d = null, e = 0, f = 0;;) {
      if (f < e) {
        var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
        c[cljs.core.key__GT_js.call(null, h)] = clj__GT_js.call(null, g);
        f += 1;
      } else {
        if (b = cljs.core.seq.call(null, b)) {
          cljs.core.chunked_seq_QMARK_.call(null, b) ? (e = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, b), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), c[cljs.core.key__GT_js.call(null, d)] = clj__GT_js.call(null, e), b = cljs.core.next.call(null, b), d = null, e = 0), f = 0;
        } else {
          break;
        }
      }
    }
    return c;
  }
  if (cljs.core.coll_QMARK_.call(null, b)) {
    c = [];
    b = cljs.core.seq.call(null, cljs.core.map.call(null, clj__GT_js, b));
    d = null;
    for (f = e = 0;;) {
      if (f < e) {
        h = cljs.core._nth.call(null, d, f), c.push(h), f += 1;
      } else {
        if (b = cljs.core.seq.call(null, b)) {
          d = b, cljs.core.chunked_seq_QMARK_.call(null, d) ? (b = cljs.core.chunk_first.call(null, d), f = cljs.core.chunk_rest.call(null, d), d = b, e = cljs.core.count.call(null, b), b = f) : (b = cljs.core.first.call(null, d), c.push(b), b = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
        } else {
          break;
        }
      }
    }
    return c;
  }
  return new cljs.core.Keyword(null, "else", "else", 1017020587) ? b : null;
};
cljs.core.IEncodeClojure = function() {
  return{};
}();
cljs.core._js__GT_clj = function(a, b) {
  if (a ? a.cljs$core$IEncodeClojure$_js__GT_clj$arity$2 : a) {
    return a.cljs$core$IEncodeClojure$_js__GT_clj$arity$2(a, b);
  }
  var c;
  c = cljs.core._js__GT_clj[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._js__GT_clj._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IEncodeClojure.-js-\x3eclj", a);
  }
  return c.call(null, a, b);
};
cljs.core.js__GT_clj = function() {
  var a = null, b = function(b) {
    return a.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !1], null));
  }, c = function() {
    var a = function(a, b) {
      if (a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.cljs$core$IEncodeClojure$) || (a.cljs$lang$protocol_mask$partition$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeClojure, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IEncodeClojure, a)) {
        return cljs.core._js__GT_clj.call(null, a, cljs.core.apply.call(null, cljs.core.array_map, b));
      }
      if (cljs.core.seq.call(null, b)) {
        var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672)), e = cljs.core.truth_(d) ? cljs.core.keyword : cljs.core.str;
        return function(a, b, c, d) {
          return function s(e) {
            return cljs.core.seq_QMARK_.call(null, e) ? cljs.core.doall.call(null, cljs.core.map.call(null, s, e)) : cljs.core.coll_QMARK_.call(null, e) ? cljs.core.into.call(null, cljs.core.empty.call(null, e), cljs.core.map.call(null, s, e)) : e instanceof Array ? cljs.core.vec.call(null, cljs.core.map.call(null, s, e)) : cljs.core.type.call(null, e) === Object ? cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
              return function(a, b, c, d) {
                return function Y(f) {
                  return new cljs.core.LazySeq(null, function(a, b, c, d) {
                    return function() {
                      for (;;) {
                        var a = cljs.core.seq.call(null, f);
                        if (a) {
                          if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                            var b = cljs.core.chunk_first.call(null, a), c = cljs.core.count.call(null, b), g = cljs.core.chunk_buffer.call(null, c);
                            a: {
                              for (var h = 0;;) {
                                if (h < c) {
                                  var k = cljs.core._nth.call(null, b, h);
                                  cljs.core.chunk_append.call(null, g, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d.call(null, k), s.call(null, e[k])], null));
                                  h += 1;
                                } else {
                                  b = !0;
                                  break a;
                                }
                              }
                              b = void 0;
                            }
                            return b ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), Y.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), null);
                          }
                          g = cljs.core.first.call(null, a);
                          return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d.call(null, g), s.call(null, e[g])], null), Y.call(null, cljs.core.rest.call(null, a)));
                        }
                        return null;
                      }
                    };
                  }(a, b, c, d), null, null);
                };
              }(a, b, c, d).call(null, cljs.core.js_keys.call(null, e));
            }()) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? e : null;
          };
        }(b, c, d, e).call(null, a);
      }
      return null;
    }, b = function(b, c) {
      var e = null;
      1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return a.call(this, b, e);
    };
    b.cljs$lang$maxFixedArity = 1;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, cljs.core.array_seq(arguments, 1));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 1;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.memoize = function(a) {
  var b = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
  return function() {
    var c = function(c) {
      var d = cljs.core.get.call(null, cljs.core.deref.call(null, b), c);
      if (cljs.core.truth_(d)) {
        return d;
      }
      d = cljs.core.apply.call(null, a, c);
      cljs.core.swap_BANG_.call(null, b, cljs.core.assoc, c, d);
      return d;
    }, d = function(a) {
      var b = null;
      0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return c.call(this, b);
    };
    d.cljs$lang$maxFixedArity = 0;
    d.cljs$lang$applyTo = function(a) {
      a = cljs.core.seq(a);
      return c(a);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = c;
    return d;
  }();
};
cljs.core.trampoline = function() {
  var a = null, b = function(a) {
    for (;;) {
      if (a = a.call(null), !cljs.core.fn_QMARK_.call(null, a)) {
        return a;
      }
    }
  }, c = function() {
    var b = function(b, c) {
      return a.call(null, function() {
        return cljs.core.apply.call(null, b, c);
      });
    }, c = function(a, c) {
      var e = null;
      1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return b.call(this, a, e);
    };
    c.cljs$lang$maxFixedArity = 1;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, cljs.core.array_seq(arguments, 1));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 1;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
cljs.core.rand = function() {
  var a = null, b = function() {
    return a.call(null, 1);
  }, c = function(a) {
    return Math.random.call(null) * a;
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
cljs.core.rand_int = function(a) {
  return Math.floor.call(null, Math.random.call(null) * a);
};
cljs.core.rand_nth = function(a) {
  return cljs.core.nth.call(null, a, cljs.core.rand_int.call(null, cljs.core.count.call(null, a)));
};
cljs.core.group_by = function(a, b) {
  return cljs.core.reduce.call(null, function(b, d) {
    var e = a.call(null, d);
    return cljs.core.assoc.call(null, b, e, cljs.core.conj.call(null, cljs.core.get.call(null, b, e, cljs.core.PersistentVector.EMPTY), d));
  }, cljs.core.PersistentArrayMap.EMPTY, b);
};
cljs.core.make_hierarchy = function() {
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "parents", "parents", 4515496059), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "descendants", "descendants", 768214664), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442), cljs.core.PersistentArrayMap.EMPTY], null);
};
cljs.core._global_hierarchy = null;
cljs.core.get_global_hierarchy = function() {
  null == cljs.core._global_hierarchy && (cljs.core._global_hierarchy = cljs.core.atom.call(null, cljs.core.make_hierarchy.call(null)));
  return cljs.core._global_hierarchy;
};
cljs.core.swap_global_hierarchy_BANG_ = function() {
  var a = function(a, b) {
    return cljs.core.apply.call(null, cljs.core.swap_BANG_, cljs.core.get_global_hierarchy.call(null), a, b);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.isa_QMARK_ = function() {
  var a = null, b = function(b, c) {
    return a.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), b, c);
  }, c = function(b, c, f) {
    var g = cljs.core._EQ_.call(null, c, f);
    if (!g && !(g = cljs.core.contains_QMARK_.call(null, (new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442)).cljs$core$IFn$_invoke$arity$1(b).call(null, c), f)) && (g = cljs.core.vector_QMARK_.call(null, f)) && (g = cljs.core.vector_QMARK_.call(null, c))) {
      if (g = cljs.core.count.call(null, f) === cljs.core.count.call(null, c)) {
        for (var g = !0, h = 0;;) {
          if (g && h !== cljs.core.count.call(null, f)) {
            g = a.call(null, b, c.call(null, h), f.call(null, h)), h += 1;
          } else {
            return g;
          }
        }
      } else {
        return g;
      }
    } else {
      return g;
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.parents = function() {
  var a = null, b = function(b) {
    return a.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), b);
  }, c = function(a, b) {
    return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "parents", "parents", 4515496059)).cljs$core$IFn$_invoke$arity$1(a), b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.ancestors = function() {
  var a = null, b = function(b) {
    return a.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), b);
  }, c = function(a, b) {
    return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442)).cljs$core$IFn$_invoke$arity$1(a), b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.descendants = function() {
  var a = null, b = function(b) {
    return a.call(null, cljs.core.deref.call(null, cljs.core.get_global_hierarchy.call(null)), b);
  }, c = function(a, b) {
    return cljs.core.not_empty.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "descendants", "descendants", 768214664)).cljs$core$IFn$_invoke$arity$1(a), b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
cljs.core.derive = function() {
  var a = null, b = function(b, c) {
    if (!cljs.core.truth_(cljs.core.namespace.call(null, c))) {
      throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "namespace", "namespace", -388313324, null), new cljs.core.Symbol(null, "parent", "parent", 1659011683, null))))].join(""));
    }
    cljs.core.swap_global_hierarchy_BANG_.call(null, a, b, c);
    return null;
  }, c = function(a, b, c) {
    if (!cljs.core.not_EQ_.call(null, b, c)) {
      throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not\x3d", "not\x3d", -1637144189, null), new cljs.core.Symbol(null, "tag", "tag", -1640416941, null), new cljs.core.Symbol(null, "parent", "parent", 1659011683, null))))].join(""));
    }
    var g = (new cljs.core.Keyword(null, "parents", "parents", 4515496059)).cljs$core$IFn$_invoke$arity$1(a), h = (new cljs.core.Keyword(null, "descendants", "descendants", 768214664)).cljs$core$IFn$_invoke$arity$1(a), k = (new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442)).cljs$core$IFn$_invoke$arity$1(a), l = function(a, b, c) {
      return function(d, e, f, g, h) {
        return cljs.core.reduce.call(null, function(a, b, c) {
          return function(a, b) {
            return cljs.core.assoc.call(null, a, b, cljs.core.reduce.call(null, cljs.core.conj, cljs.core.get.call(null, h, b, cljs.core.PersistentHashSet.EMPTY), cljs.core.cons.call(null, g, h.call(null, g))));
          };
        }(a, b, c), d, cljs.core.cons.call(null, e, f.call(null, e)));
      };
    }(g, h, k);
    if (cljs.core.contains_QMARK_.call(null, g.call(null, b), c)) {
      b = null;
    } else {
      if (cljs.core.contains_QMARK_.call(null, k.call(null, b), c)) {
        throw Error([cljs.core.str(b), cljs.core.str("already has"), cljs.core.str(c), cljs.core.str("as ancestor")].join(""));
      }
      if (cljs.core.contains_QMARK_.call(null, k.call(null, c), b)) {
        throw Error([cljs.core.str("Cyclic derivation:"), cljs.core.str(c), cljs.core.str("has"), cljs.core.str(b), cljs.core.str("as ancestor")].join(""));
      }
      b = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "parents", "parents", 4515496059), cljs.core.assoc.call(null, (new cljs.core.Keyword(null, "parents", "parents", 4515496059)).cljs$core$IFn$_invoke$arity$1(a), b, cljs.core.conj.call(null, cljs.core.get.call(null, g, b, cljs.core.PersistentHashSet.EMPTY), c)), new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442), l.call(null, (new cljs.core.Keyword(null, "ancestors", "ancestors", 889955442)).cljs$core$IFn$_invoke$arity$1(a), 
      b, h, c, k), new cljs.core.Keyword(null, "descendants", "descendants", 768214664), l.call(null, (new cljs.core.Keyword(null, "descendants", "descendants", 768214664)).cljs$core$IFn$_invoke$arity$1(a), c, k, b, h)], null);
    }
    return cljs.core.truth_(b) ? b : a;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.underive = function() {
  var a = null, b = function(b, c) {
    cljs.core.swap_global_hierarchy_BANG_.call(null, a, b, c);
    return null;
  }, c = function(a, b, c) {
    var g = (new cljs.core.Keyword(null, "parents", "parents", 4515496059)).cljs$core$IFn$_invoke$arity$1(a), h = cljs.core.truth_(g.call(null, b)) ? cljs.core.disj.call(null, g.call(null, b), c) : cljs.core.PersistentHashSet.EMPTY, k = cljs.core.truth_(cljs.core.not_empty.call(null, h)) ? cljs.core.assoc.call(null, g, b, h) : cljs.core.dissoc.call(null, g, b), h = cljs.core.flatten.call(null, cljs.core.map.call(null, function(a, b, c) {
      return function(a) {
        return cljs.core.cons.call(null, cljs.core.first.call(null, a), cljs.core.interpose.call(null, cljs.core.first.call(null, a), cljs.core.second.call(null, a)));
      };
    }(g, h, k), cljs.core.seq.call(null, k)));
    return cljs.core.contains_QMARK_.call(null, g.call(null, b), c) ? cljs.core.reduce.call(null, function(a, b) {
      return cljs.core.apply.call(null, cljs.core.derive, a, b);
    }, cljs.core.make_hierarchy.call(null), cljs.core.partition.call(null, 2, h)) : a;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.reset_cache = function(a, b, c, d) {
  cljs.core.swap_BANG_.call(null, a, function(a) {
    return cljs.core.deref.call(null, b);
  });
  return cljs.core.swap_BANG_.call(null, c, function(a) {
    return cljs.core.deref.call(null, d);
  });
};
cljs.core.prefers_STAR_ = function prefers_STAR_(b, c, d) {
  var e = cljs.core.deref.call(null, d).call(null, b), e = cljs.core.truth_(cljs.core.truth_(e) ? e.call(null, c) : e) ? !0 : null;
  if (cljs.core.truth_(e)) {
    return e;
  }
  e = function() {
    for (var e = cljs.core.parents.call(null, c);;) {
      if (0 < cljs.core.count.call(null, e)) {
        cljs.core.truth_(prefers_STAR_.call(null, b, cljs.core.first.call(null, e), d)), e = cljs.core.rest.call(null, e);
      } else {
        return null;
      }
    }
  }();
  if (cljs.core.truth_(e)) {
    return e;
  }
  e = function() {
    for (var e = cljs.core.parents.call(null, b);;) {
      if (0 < cljs.core.count.call(null, e)) {
        cljs.core.truth_(prefers_STAR_.call(null, cljs.core.first.call(null, e), c, d)), e = cljs.core.rest.call(null, e);
      } else {
        return null;
      }
    }
  }();
  return cljs.core.truth_(e) ? e : !1;
};
cljs.core.dominates = function(a, b, c) {
  c = cljs.core.prefers_STAR_.call(null, a, b, c);
  return cljs.core.truth_(c) ? c : cljs.core.isa_QMARK_.call(null, a, b);
};
cljs.core.find_and_cache_best_method = function find_and_cache_best_method(b, c, d, e, f, g, h) {
  var k = cljs.core.reduce.call(null, function(e, g) {
    var h = cljs.core.nth.call(null, g, 0, null);
    cljs.core.nth.call(null, g, 1, null);
    if (cljs.core.isa_QMARK_.call(null, cljs.core.deref.call(null, d), c, h)) {
      var k = cljs.core.truth_(function() {
        var b = null == e;
        return b ? b : cljs.core.dominates.call(null, h, cljs.core.first.call(null, e), f);
      }()) ? g : e;
      if (!cljs.core.truth_(cljs.core.dominates.call(null, cljs.core.first.call(null, k), h, f))) {
        throw Error([cljs.core.str("Multiple methods in multimethod '"), cljs.core.str(b), cljs.core.str("' match dispatch value: "), cljs.core.str(c), cljs.core.str(" -\x3e "), cljs.core.str(h), cljs.core.str(" and "), cljs.core.str(cljs.core.first.call(null, k)), cljs.core.str(", and neither is preferred")].join(""));
      }
      return k;
    }
    return e;
  }, null, cljs.core.deref.call(null, e));
  if (cljs.core.truth_(k)) {
    if (cljs.core._EQ_.call(null, cljs.core.deref.call(null, h), cljs.core.deref.call(null, d))) {
      return cljs.core.swap_BANG_.call(null, g, cljs.core.assoc, c, cljs.core.second.call(null, k)), cljs.core.second.call(null, k);
    }
    cljs.core.reset_cache.call(null, g, e, h, d);
    return find_and_cache_best_method.call(null, b, c, d, e, f, g, h);
  }
  return null;
};
cljs.core.IMultiFn = function() {
  return{};
}();
cljs.core._reset = function(a) {
  if (a ? a.cljs$core$IMultiFn$_reset$arity$1 : a) {
    return a.cljs$core$IMultiFn$_reset$arity$1(a);
  }
  var b;
  b = cljs.core._reset[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._reset._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-reset", a);
  }
  return b.call(null, a);
};
cljs.core._add_method = function(a, b, c) {
  if (a ? a.cljs$core$IMultiFn$_add_method$arity$3 : a) {
    return a.cljs$core$IMultiFn$_add_method$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._add_method[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._add_method._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-add-method", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._remove_method = function(a, b) {
  if (a ? a.cljs$core$IMultiFn$_remove_method$arity$2 : a) {
    return a.cljs$core$IMultiFn$_remove_method$arity$2(a, b);
  }
  var c;
  c = cljs.core._remove_method[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._remove_method._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-remove-method", a);
  }
  return c.call(null, a, b);
};
cljs.core._prefer_method = function(a, b, c) {
  if (a ? a.cljs$core$IMultiFn$_prefer_method$arity$3 : a) {
    return a.cljs$core$IMultiFn$_prefer_method$arity$3(a, b, c);
  }
  var d;
  d = cljs.core._prefer_method[goog.typeOf(null == a ? null : a)];
  if (!d && (d = cljs.core._prefer_method._, !d)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefer-method", a);
  }
  return d.call(null, a, b, c);
};
cljs.core._get_method = function(a, b) {
  if (a ? a.cljs$core$IMultiFn$_get_method$arity$2 : a) {
    return a.cljs$core$IMultiFn$_get_method$arity$2(a, b);
  }
  var c;
  c = cljs.core._get_method[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._get_method._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-get-method", a);
  }
  return c.call(null, a, b);
};
cljs.core._methods = function(a) {
  if (a ? a.cljs$core$IMultiFn$_methods$arity$1 : a) {
    return a.cljs$core$IMultiFn$_methods$arity$1(a);
  }
  var b;
  b = cljs.core._methods[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._methods._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-methods", a);
  }
  return b.call(null, a);
};
cljs.core._prefers = function(a) {
  if (a ? a.cljs$core$IMultiFn$_prefers$arity$1 : a) {
    return a.cljs$core$IMultiFn$_prefers$arity$1(a);
  }
  var b;
  b = cljs.core._prefers[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.core._prefers._, !b)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-prefers", a);
  }
  return b.call(null, a);
};
cljs.core._dispatch = function(a, b) {
  if (a ? a.cljs$core$IMultiFn$_dispatch$arity$2 : a) {
    return a.cljs$core$IMultiFn$_dispatch$arity$2(a, b);
  }
  var c;
  c = cljs.core._dispatch[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.core._dispatch._, !c)) {
    throw cljs.core.missing_protocol.call(null, "IMultiFn.-dispatch", a);
  }
  return c.call(null, a, b);
};
cljs.core.do_dispatch = function(a, b, c, d) {
  c = cljs.core.apply.call(null, c, d);
  a = cljs.core._get_method.call(null, a, c);
  if (!cljs.core.truth_(a)) {
    throw Error([cljs.core.str("No method in multimethod '"), cljs.core.str(b), cljs.core.str("' for dispatch value: "), cljs.core.str(c)].join(""));
  }
  return cljs.core.apply.call(null, a, d);
};
cljs.core.MultiFn = function(a, b, c, d, e, f, g, h) {
  this.name = a;
  this.dispatch_fn = b;
  this.default_dispatch_val = c;
  this.hierarchy = d;
  this.method_table = e;
  this.prefer_table = f;
  this.method_cache = g;
  this.cached_hierarchy = h;
  this.cljs$lang$protocol_mask$partition0$ = 4194304;
  this.cljs$lang$protocol_mask$partition1$ = 256;
};
cljs.core.MultiFn.cljs$lang$type = !0;
cljs.core.MultiFn.cljs$lang$ctorStr = "cljs.core/MultiFn";
cljs.core.MultiFn.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/MultiFn");
};
cljs.core.MultiFn.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return goog.getUid(this);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_reset$arity$1 = function(a) {
  cljs.core.swap_BANG_.call(null, this.method_table, function(a) {
    return cljs.core.PersistentArrayMap.EMPTY;
  });
  cljs.core.swap_BANG_.call(null, this.method_cache, function(a) {
    return cljs.core.PersistentArrayMap.EMPTY;
  });
  cljs.core.swap_BANG_.call(null, this.prefer_table, function(a) {
    return cljs.core.PersistentArrayMap.EMPTY;
  });
  cljs.core.swap_BANG_.call(null, this.cached_hierarchy, function(a) {
    return null;
  });
  return this;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_add_method$arity$3 = function(a, b, c) {
  cljs.core.swap_BANG_.call(null, this.method_table, cljs.core.assoc, b, c);
  cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
  return this;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_remove_method$arity$2 = function(a, b) {
  cljs.core.swap_BANG_.call(null, this.method_table, cljs.core.dissoc, b);
  cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
  return this;
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_get_method$arity$2 = function(a, b) {
  cljs.core._EQ_.call(null, cljs.core.deref.call(null, this.cached_hierarchy), cljs.core.deref.call(null, this.hierarchy)) || cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
  var c = cljs.core.deref.call(null, this.method_cache).call(null, b);
  if (cljs.core.truth_(c)) {
    return c;
  }
  c = cljs.core.find_and_cache_best_method.call(null, this.name, b, this.hierarchy, this.method_table, this.prefer_table, this.method_cache, this.cached_hierarchy);
  return cljs.core.truth_(c) ? c : cljs.core.deref.call(null, this.method_table).call(null, this.default_dispatch_val);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefer_method$arity$3 = function(a, b, c) {
  if (cljs.core.truth_(cljs.core.prefers_STAR_.call(null, b, c, this.prefer_table))) {
    throw Error([cljs.core.str("Preference conflict in multimethod '"), cljs.core.str(this.name), cljs.core.str("': "), cljs.core.str(c), cljs.core.str(" is already preferred to "), cljs.core.str(b)].join(""));
  }
  cljs.core.swap_BANG_.call(null, this.prefer_table, function(a) {
    return cljs.core.assoc.call(null, a, b, cljs.core.conj.call(null, cljs.core.get.call(null, a, b, cljs.core.PersistentHashSet.EMPTY), c));
  });
  return cljs.core.reset_cache.call(null, this.method_cache, this.method_table, this.cached_hierarchy, this.hierarchy);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_methods$arity$1 = function(a) {
  return cljs.core.deref.call(null, this.method_table);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_prefers$arity$1 = function(a) {
  return cljs.core.deref.call(null, this.prefer_table);
};
cljs.core.MultiFn.prototype.cljs$core$IMultiFn$_dispatch$arity$2 = function(a, b) {
  return cljs.core.do_dispatch.call(null, this, this.name, this.dispatch_fn, b);
};
cljs.core.__GT_MultiFn = function(a, b, c, d, e, f, g, h) {
  return new cljs.core.MultiFn(a, b, c, d, e, f, g, h);
};
cljs.core.MultiFn.prototype.call = function() {
  var a = function(a, b) {
    return cljs.core._dispatch.call(null, this, b);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.core.MultiFn.prototype.apply = function(a, b) {
  return cljs.core._dispatch.call(null, this, b);
};
cljs.core.remove_all_methods = function(a) {
  return cljs.core._reset.call(null, a);
};
cljs.core.remove_method = function(a, b) {
  return cljs.core._remove_method.call(null, a, b);
};
cljs.core.prefer_method = function(a, b, c) {
  return cljs.core._prefer_method.call(null, a, b, c);
};
cljs.core.methods$ = function(a) {
  return cljs.core._methods.call(null, a);
};
cljs.core.get_method = function(a, b) {
  return cljs.core._get_method.call(null, a, b);
};
cljs.core.prefers = function(a) {
  return cljs.core._prefers.call(null, a);
};
cljs.core.UUID = function(a) {
  this.uuid = a;
  this.cljs$lang$protocol_mask$partition1$ = 0;
  this.cljs$lang$protocol_mask$partition0$ = 2153775104;
};
cljs.core.UUID.cljs$lang$type = !0;
cljs.core.UUID.cljs$lang$ctorStr = "cljs.core/UUID";
cljs.core.UUID.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/UUID");
};
cljs.core.UUID.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return goog.string.hashCode(cljs.core.pr_str.call(null, this));
};
cljs.core.UUID.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, [cljs.core.str('#uuid "'), cljs.core.str(this.uuid), cljs.core.str('"')].join(""));
};
cljs.core.UUID.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return b instanceof cljs.core.UUID && this.uuid === b.uuid;
};
cljs.core.UUID.prototype.cljs$core$ICloneable$ = !0;
cljs.core.UUID.prototype.cljs$core$ICloneable$_clone$arity$1 = function(a) {
  return new cljs.core.UUID(this.uuid);
};
cljs.core.__GT_UUID = function(a) {
  return new cljs.core.UUID(a);
};
cljs.core.ExceptionInfo = function(a, b, c) {
  this.message = a;
  this.data = b;
  this.cause = c;
};
cljs.core.ExceptionInfo.cljs$lang$type = !0;
cljs.core.ExceptionInfo.cljs$lang$ctorStr = "cljs.core/ExceptionInfo";
cljs.core.ExceptionInfo.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.core/ExceptionInfo");
};
cljs.core.__GT_ExceptionInfo = function(a, b, c) {
  return new cljs.core.ExceptionInfo(a, b, c);
};
cljs.core.ExceptionInfo.prototype = Error();
cljs.core.ExceptionInfo.prototype.constructor = cljs.core.ExceptionInfo;
cljs.core.ex_info = function() {
  var a = null, b = function(a, b) {
    return new cljs.core.ExceptionInfo(a, b, null);
  }, c = function(a, b, c) {
    return new cljs.core.ExceptionInfo(a, b, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
cljs.core.ex_data = function(a) {
  return a instanceof cljs.core.ExceptionInfo ? a.data : null;
};
cljs.core.ex_message = function(a) {
  return a instanceof Error ? a.message : null;
};
cljs.core.ex_cause = function(a) {
  return a instanceof cljs.core.ExceptionInfo ? a.cause : null;
};
cljs.core.comparator = function(a) {
  return function(b, c) {
    return cljs.core.truth_(a.call(null, b, c)) ? -1 : cljs.core.truth_(a.call(null, c, b)) ? 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? 0 : null;
  };
};
cljs.core.special_symbol_QMARK_ = function(a) {
  return cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 19, [new cljs.core.Symbol(null, "deftype*", "deftype*", -978581244, null), null, new cljs.core.Symbol(null, "new", "new", -1640422567, null), null, new cljs.core.Symbol(null, "quote", "quote", -1532577739, null), null, new cljs.core.Symbol(null, "\x26", "\x26", -1640531489, null), null, new cljs.core.Symbol(null, "set!", "set!", -1637004872, null), null, new cljs.core.Symbol(null, 
  "recur", "recur", -1532142362, null), null, new cljs.core.Symbol(null, ".", ".", -1640531481, null), null, new cljs.core.Symbol(null, "ns", "ns", -1640528002, null), null, new cljs.core.Symbol(null, "do", "do", -1640528316, null), null, new cljs.core.Symbol(null, "fn*", "fn*", -1640430053, null), null, new cljs.core.Symbol(null, "throw", "throw", -1530191713, null), null, new cljs.core.Symbol(null, "letfn*", "letfn*", 1548249632, null), null, new cljs.core.Symbol(null, "js*", "js*", -1640426054, 
  null), null, new cljs.core.Symbol(null, "defrecord*", "defrecord*", 774272013, null), null, new cljs.core.Symbol(null, "let*", "let*", -1637213400, null), null, new cljs.core.Symbol(null, "loop*", "loop*", -1537374273, null), null, new cljs.core.Symbol(null, "try", "try", -1640416396, null), null, new cljs.core.Symbol(null, "if", "if", -1640528170, null), null, new cljs.core.Symbol(null, "def", "def", -1640432194, null), null], null), null), a);
};
var lt = {util:{}};
lt.util.style = {};
lt.util.style.__GT_px = function(a) {
  return[cljs.core.str(cljs.core.truth_(a) ? a : 0), cljs.core.str("px")].join("");
};
goog.disposable = {};
goog.disposable.IDisposable = function() {
};
goog.Disposable = function() {
  goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF && (this.creationStack = Error().stack, goog.Disposable.instances_[goog.getUid(this)] = this);
};
goog.Disposable.MonitoringMode = {OFF:0, PERMANENT:1, INTERACTIVE:2};
goog.Disposable.MONITORING_MODE = 0;
goog.Disposable.instances_ = {};
goog.Disposable.getUndisposedObjects = function() {
  var a = [], b;
  for (b in goog.Disposable.instances_) {
    goog.Disposable.instances_.hasOwnProperty(b) && a.push(goog.Disposable.instances_[Number(b)]);
  }
  return a;
};
goog.Disposable.clearUndisposedObjects = function() {
  goog.Disposable.instances_ = {};
};
goog.Disposable.prototype.disposed_ = !1;
goog.Disposable.prototype.isDisposed = function() {
  return this.disposed_;
};
goog.Disposable.prototype.getDisposed = goog.Disposable.prototype.isDisposed;
goog.Disposable.prototype.dispose = function() {
  if (!this.disposed_ && (this.disposed_ = !0, this.disposeInternal(), goog.Disposable.MONITORING_MODE != goog.Disposable.MonitoringMode.OFF)) {
    var a = goog.getUid(this);
    if (goog.Disposable.MONITORING_MODE == goog.Disposable.MonitoringMode.PERMANENT && !goog.Disposable.instances_.hasOwnProperty(a)) {
      throw Error(this + " did not call the goog.Disposable base constructor or was disposed of after a clearUndisposedObjects call");
    }
    delete goog.Disposable.instances_[a];
  }
};
goog.Disposable.prototype.registerDisposable = function(a) {
  this.addOnDisposeCallback(goog.partial(goog.dispose, a));
};
goog.Disposable.prototype.addOnDisposeCallback = function(a, b) {
  this.onDisposeCallbacks_ || (this.onDisposeCallbacks_ = []);
  this.onDisposeCallbacks_.push(goog.bind(a, b));
};
goog.Disposable.prototype.disposeInternal = function() {
  if (this.onDisposeCallbacks_) {
    for (;this.onDisposeCallbacks_.length;) {
      this.onDisposeCallbacks_.shift()();
    }
  }
};
goog.Disposable.isDisposed = function(a) {
  return a && "function" == typeof a.isDisposed ? a.isDisposed() : !1;
};
goog.dispose = function(a) {
  a && "function" == typeof a.dispose && a.dispose();
};
goog.disposeAll = function(a) {
  for (var b = 0, c = arguments.length;b < c;++b) {
    var d = arguments[b];
    goog.isArrayLike(d) ? goog.disposeAll.apply(null, d) : goog.dispose(d);
  }
};
goog.debug.entryPointRegistry = {};
goog.debug.EntryPointMonitor = function() {
};
goog.debug.entryPointRegistry.refList_ = [];
goog.debug.entryPointRegistry.monitors_ = [];
goog.debug.entryPointRegistry.monitorsMayExist_ = !1;
goog.debug.entryPointRegistry.register = function(a) {
  goog.debug.entryPointRegistry.refList_[goog.debug.entryPointRegistry.refList_.length] = a;
  if (goog.debug.entryPointRegistry.monitorsMayExist_) {
    for (var b = goog.debug.entryPointRegistry.monitors_, c = 0;c < b.length;c++) {
      a(goog.bind(b[c].wrap, b[c]));
    }
  }
};
goog.debug.entryPointRegistry.monitorAll = function(a) {
  goog.debug.entryPointRegistry.monitorsMayExist_ = !0;
  for (var b = goog.bind(a.wrap, a), c = 0;c < goog.debug.entryPointRegistry.refList_.length;c++) {
    goog.debug.entryPointRegistry.refList_[c](b);
  }
  goog.debug.entryPointRegistry.monitors_.push(a);
};
goog.debug.entryPointRegistry.unmonitorAllIfPossible = function(a) {
  var b = goog.debug.entryPointRegistry.monitors_;
  goog.asserts.assert(a == b[b.length - 1], "Only the most recent monitor can be unwrapped.");
  a = goog.bind(a.unwrap, a);
  for (var c = 0;c < goog.debug.entryPointRegistry.refList_.length;c++) {
    goog.debug.entryPointRegistry.refList_[c](a);
  }
  b.length--;
};
goog.debug.errorHandlerWeakDep = {protectEntryPoint:function(a, b) {
  return a;
}};
goog.userAgent = {};
goog.userAgent.ASSUME_IE = !1;
goog.userAgent.ASSUME_GECKO = !1;
goog.userAgent.ASSUME_WEBKIT = !1;
goog.userAgent.ASSUME_MOBILE_WEBKIT = !1;
goog.userAgent.ASSUME_OPERA = !1;
goog.userAgent.ASSUME_ANY_VERSION = !1;
goog.userAgent.BROWSER_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_GECKO || goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_OPERA;
goog.userAgent.getUserAgentString = function() {
  return goog.global.navigator ? goog.global.navigator.userAgent : null;
};
goog.userAgent.getNavigator = function() {
  return goog.global.navigator;
};
goog.userAgent.init_ = function() {
  goog.userAgent.detectedOpera_ = !1;
  goog.userAgent.detectedIe_ = !1;
  goog.userAgent.detectedWebkit_ = !1;
  goog.userAgent.detectedMobile_ = !1;
  goog.userAgent.detectedGecko_ = !1;
  var a;
  if (!goog.userAgent.BROWSER_KNOWN_ && (a = goog.userAgent.getUserAgentString())) {
    var b = goog.userAgent.getNavigator();
    goog.userAgent.detectedOpera_ = 0 == a.indexOf("Opera");
    goog.userAgent.detectedIe_ = !goog.userAgent.detectedOpera_ && -1 != a.indexOf("MSIE");
    goog.userAgent.detectedWebkit_ = !goog.userAgent.detectedOpera_ && -1 != a.indexOf("WebKit");
    goog.userAgent.detectedMobile_ = goog.userAgent.detectedWebkit_ && -1 != a.indexOf("Mobile");
    goog.userAgent.detectedGecko_ = !goog.userAgent.detectedOpera_ && !goog.userAgent.detectedWebkit_ && "Gecko" == b.product;
  }
};
goog.userAgent.BROWSER_KNOWN_ || goog.userAgent.init_();
goog.userAgent.OPERA = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_OPERA : goog.userAgent.detectedOpera_;
goog.userAgent.IE = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_IE : goog.userAgent.detectedIe_;
goog.userAgent.GECKO = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_GECKO : goog.userAgent.detectedGecko_;
goog.userAgent.WEBKIT = goog.userAgent.BROWSER_KNOWN_ ? goog.userAgent.ASSUME_WEBKIT || goog.userAgent.ASSUME_MOBILE_WEBKIT : goog.userAgent.detectedWebkit_;
goog.userAgent.MOBILE = goog.userAgent.ASSUME_MOBILE_WEBKIT || goog.userAgent.detectedMobile_;
goog.userAgent.SAFARI = goog.userAgent.WEBKIT;
goog.userAgent.determinePlatform_ = function() {
  var a = goog.userAgent.getNavigator();
  return a && a.platform || "";
};
goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
goog.userAgent.ASSUME_MAC = !1;
goog.userAgent.ASSUME_WINDOWS = !1;
goog.userAgent.ASSUME_LINUX = !1;
goog.userAgent.ASSUME_X11 = !1;
goog.userAgent.ASSUME_ANDROID = !1;
goog.userAgent.ASSUME_IPHONE = !1;
goog.userAgent.ASSUME_IPAD = !1;
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_X11 || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD;
goog.userAgent.initPlatform_ = function() {
  goog.userAgent.detectedMac_ = goog.string.contains(goog.userAgent.PLATFORM, "Mac");
  goog.userAgent.detectedWindows_ = goog.string.contains(goog.userAgent.PLATFORM, "Win");
  goog.userAgent.detectedLinux_ = goog.string.contains(goog.userAgent.PLATFORM, "Linux");
  goog.userAgent.detectedX11_ = !!goog.userAgent.getNavigator() && goog.string.contains(goog.userAgent.getNavigator().appVersion || "", "X11");
  var a = goog.userAgent.getUserAgentString();
  goog.userAgent.detectedAndroid_ = !!a && 0 <= a.indexOf("Android");
  goog.userAgent.detectedIPhone_ = !!a && 0 <= a.indexOf("iPhone");
  goog.userAgent.detectedIPad_ = !!a && 0 <= a.indexOf("iPad");
};
goog.userAgent.PLATFORM_KNOWN_ || goog.userAgent.initPlatform_();
goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : goog.userAgent.detectedMac_;
goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : goog.userAgent.detectedWindows_;
goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.detectedLinux_;
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.detectedX11_;
goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.userAgent.detectedAndroid_;
goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.userAgent.detectedIPhone_;
goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.userAgent.detectedIPad_;
goog.userAgent.determineVersion_ = function() {
  var a = "", b;
  goog.userAgent.OPERA && goog.global.opera ? (a = goog.global.opera.version, a = "function" == typeof a ? a() : a) : (goog.userAgent.GECKO ? b = /rv\:([^\);]+)(\)|;)/ : goog.userAgent.IE ? b = /MSIE\s+([^\);]+)(\)|;)/ : goog.userAgent.WEBKIT && (b = /WebKit\/(\S+)/), b && (a = (a = b.exec(goog.userAgent.getUserAgentString())) ? a[1] : ""));
  return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), b > parseFloat(a)) ? String(b) : a;
};
goog.userAgent.getDocumentMode_ = function() {
  var a = goog.global.document;
  return a ? a.documentMode : void 0;
};
goog.userAgent.VERSION = goog.userAgent.determineVersion_();
goog.userAgent.compare = function(a, b) {
  return goog.string.compareVersions(a, b);
};
goog.userAgent.isVersionCache_ = {};
goog.userAgent.isVersion = function(a) {
  return goog.userAgent.ASSUME_ANY_VERSION || goog.userAgent.isVersionCache_[a] || (goog.userAgent.isVersionCache_[a] = 0 <= goog.string.compareVersions(goog.userAgent.VERSION, a));
};
goog.userAgent.isDocumentMode = function(a) {
  return goog.userAgent.IE && goog.userAgent.DOCUMENT_MODE >= a;
};
goog.userAgent.DOCUMENT_MODE = function() {
  var a = goog.global.document;
  return a && goog.userAgent.IE ? goog.userAgent.getDocumentMode_() || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5) : void 0;
}();
goog.events = {};
goog.events.BrowserFeature = {HAS_W3C_BUTTON:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), HAS_W3C_EVENT_SUPPORT:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), SET_KEY_CODE_TO_PREVENT_DEFAULT:goog.userAgent.IE && !goog.userAgent.isVersion("9"), HAS_NAVIGATOR_ONLINE_PROPERTY:!goog.userAgent.WEBKIT || goog.userAgent.isVersion("528"), HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO && goog.userAgent.isVersion("1.9b") || goog.userAgent.IE && goog.userAgent.isVersion("8") || goog.userAgent.OPERA && 
goog.userAgent.isVersion("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersion("528"), HTML5_NETWORK_EVENTS_FIRE_ON_BODY:goog.userAgent.GECKO && !goog.userAgent.isVersion("8") || goog.userAgent.IE && !goog.userAgent.isVersion("9"), TOUCH_ENABLED:"ontouchstart" in goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.msMaxTouchPoints)};
goog.events.Event = function(a, b) {
  this.type = a;
  this.currentTarget = this.target = b;
};
goog.events.Event.prototype.disposeInternal = function() {
};
goog.events.Event.prototype.dispose = function() {
};
goog.events.Event.prototype.propagationStopped_ = !1;
goog.events.Event.prototype.defaultPrevented = !1;
goog.events.Event.prototype.returnValue_ = !0;
goog.events.Event.prototype.stopPropagation = function() {
  this.propagationStopped_ = !0;
};
goog.events.Event.prototype.preventDefault = function() {
  this.defaultPrevented = !0;
  this.returnValue_ = !1;
};
goog.events.Event.stopPropagation = function(a) {
  a.stopPropagation();
};
goog.events.Event.preventDefault = function(a) {
  a.preventDefault();
};
goog.events.EventType = {CLICK:"click", DBLCLICK:"dblclick", MOUSEDOWN:"mousedown", MOUSEUP:"mouseup", MOUSEOVER:"mouseover", MOUSEOUT:"mouseout", MOUSEMOVE:"mousemove", SELECTSTART:"selectstart", KEYPRESS:"keypress", KEYDOWN:"keydown", KEYUP:"keyup", BLUR:"blur", FOCUS:"focus", DEACTIVATE:"deactivate", FOCUSIN:goog.userAgent.IE ? "focusin" : "DOMFocusIn", FOCUSOUT:goog.userAgent.IE ? "focusout" : "DOMFocusOut", CHANGE:"change", SELECT:"select", SUBMIT:"submit", INPUT:"input", PROPERTYCHANGE:"propertychange", 
DRAGSTART:"dragstart", DRAG:"drag", DRAGENTER:"dragenter", DRAGOVER:"dragover", DRAGLEAVE:"dragleave", DROP:"drop", DRAGEND:"dragend", TOUCHSTART:"touchstart", TOUCHMOVE:"touchmove", TOUCHEND:"touchend", TOUCHCANCEL:"touchcancel", BEFOREUNLOAD:"beforeunload", CONTEXTMENU:"contextmenu", ERROR:"error", HELP:"help", LOAD:"load", LOSECAPTURE:"losecapture", READYSTATECHANGE:"readystatechange", RESIZE:"resize", SCROLL:"scroll", UNLOAD:"unload", HASHCHANGE:"hashchange", PAGEHIDE:"pagehide", PAGESHOW:"pageshow", 
POPSTATE:"popstate", COPY:"copy", PASTE:"paste", CUT:"cut", BEFORECOPY:"beforecopy", BEFORECUT:"beforecut", BEFOREPASTE:"beforepaste", ONLINE:"online", OFFLINE:"offline", MESSAGE:"message", CONNECT:"connect", TRANSITIONEND:goog.userAgent.WEBKIT ? "webkitTransitionEnd" : goog.userAgent.OPERA ? "oTransitionEnd" : "transitionend", MSGESTURECHANGE:"MSGestureChange", MSGESTUREEND:"MSGestureEnd", MSGESTUREHOLD:"MSGestureHold", MSGESTURESTART:"MSGestureStart", MSGESTURETAP:"MSGestureTap", MSGOTPOINTERCAPTURE:"MSGotPointerCapture", 
MSINERTIASTART:"MSInertiaStart", MSLOSTPOINTERCAPTURE:"MSLostPointerCapture", MSPOINTERCANCEL:"MSPointerCancel", MSPOINTERDOWN:"MSPointerDown", MSPOINTERMOVE:"MSPointerMove", MSPOINTEROVER:"MSPointerOver", MSPOINTEROUT:"MSPointerOut", MSPOINTERUP:"MSPointerUp", TEXTINPUT:"textinput", COMPOSITIONSTART:"compositionstart", COMPOSITIONUPDATE:"compositionupdate", COMPOSITIONEND:"compositionend"};
goog.reflect = {};
goog.reflect.object = function(a, b) {
  return b;
};
goog.reflect.sinkValue = function(a) {
  goog.reflect.sinkValue[" "](a);
  return a;
};
goog.reflect.sinkValue[" "] = goog.nullFunction;
goog.reflect.canAccessProperty = function(a, b) {
  try {
    return goog.reflect.sinkValue(a[b]), !0;
  } catch (c) {
  }
  return!1;
};
goog.events.BrowserEvent = function(a, b) {
  a && this.init(a, b);
};
goog.inherits(goog.events.BrowserEvent, goog.events.Event);
goog.events.BrowserEvent.MouseButton = {LEFT:0, MIDDLE:1, RIGHT:2};
goog.events.BrowserEvent.IEButtonMap = [1, 4, 2];
goog.events.BrowserEvent.prototype.target = null;
goog.events.BrowserEvent.prototype.relatedTarget = null;
goog.events.BrowserEvent.prototype.offsetX = 0;
goog.events.BrowserEvent.prototype.offsetY = 0;
goog.events.BrowserEvent.prototype.clientX = 0;
goog.events.BrowserEvent.prototype.clientY = 0;
goog.events.BrowserEvent.prototype.screenX = 0;
goog.events.BrowserEvent.prototype.screenY = 0;
goog.events.BrowserEvent.prototype.button = 0;
goog.events.BrowserEvent.prototype.keyCode = 0;
goog.events.BrowserEvent.prototype.charCode = 0;
goog.events.BrowserEvent.prototype.ctrlKey = !1;
goog.events.BrowserEvent.prototype.altKey = !1;
goog.events.BrowserEvent.prototype.shiftKey = !1;
goog.events.BrowserEvent.prototype.metaKey = !1;
goog.events.BrowserEvent.prototype.platformModifierKey = !1;
goog.events.BrowserEvent.prototype.event_ = null;
goog.events.BrowserEvent.prototype.init = function(a, b) {
  var c = this.type = a.type;
  goog.events.Event.call(this, c);
  this.target = a.target || a.srcElement;
  this.currentTarget = b;
  var d = a.relatedTarget;
  d ? goog.userAgent.GECKO && (goog.reflect.canAccessProperty(d, "nodeName") || (d = null)) : c == goog.events.EventType.MOUSEOVER ? d = a.fromElement : c == goog.events.EventType.MOUSEOUT && (d = a.toElement);
  this.relatedTarget = d;
  this.offsetX = goog.userAgent.WEBKIT || void 0 !== a.offsetX ? a.offsetX : a.layerX;
  this.offsetY = goog.userAgent.WEBKIT || void 0 !== a.offsetY ? a.offsetY : a.layerY;
  this.clientX = void 0 !== a.clientX ? a.clientX : a.pageX;
  this.clientY = void 0 !== a.clientY ? a.clientY : a.pageY;
  this.screenX = a.screenX || 0;
  this.screenY = a.screenY || 0;
  this.button = a.button;
  this.keyCode = a.keyCode || 0;
  this.charCode = a.charCode || ("keypress" == c ? a.keyCode : 0);
  this.ctrlKey = a.ctrlKey;
  this.altKey = a.altKey;
  this.shiftKey = a.shiftKey;
  this.metaKey = a.metaKey;
  this.platformModifierKey = goog.userAgent.MAC ? a.metaKey : a.ctrlKey;
  this.state = a.state;
  this.event_ = a;
  a.defaultPrevented && this.preventDefault();
  delete this.propagationStopped_;
};
goog.events.BrowserEvent.prototype.isButton = function(a) {
  return goog.events.BrowserFeature.HAS_W3C_BUTTON ? this.event_.button == a : "click" == this.type ? a == goog.events.BrowserEvent.MouseButton.LEFT : !!(this.event_.button & goog.events.BrowserEvent.IEButtonMap[a]);
};
goog.events.BrowserEvent.prototype.isMouseActionButton = function() {
  return this.isButton(goog.events.BrowserEvent.MouseButton.LEFT) && !(goog.userAgent.WEBKIT && goog.userAgent.MAC && this.ctrlKey);
};
goog.events.BrowserEvent.prototype.stopPropagation = function() {
  goog.events.BrowserEvent.superClass_.stopPropagation.call(this);
  this.event_.stopPropagation ? this.event_.stopPropagation() : this.event_.cancelBubble = !0;
};
goog.events.BrowserEvent.prototype.preventDefault = function() {
  goog.events.BrowserEvent.superClass_.preventDefault.call(this);
  var a = this.event_;
  if (a.preventDefault) {
    a.preventDefault();
  } else {
    if (a.returnValue = !1, goog.events.BrowserFeature.SET_KEY_CODE_TO_PREVENT_DEFAULT) {
      try {
        if (a.ctrlKey || 112 <= a.keyCode && 123 >= a.keyCode) {
          a.keyCode = -1;
        }
      } catch (b) {
      }
    }
  }
};
goog.events.BrowserEvent.prototype.getBrowserEvent = function() {
  return this.event_;
};
goog.events.BrowserEvent.prototype.disposeInternal = function() {
};
goog.events.EventWrapper = function() {
};
goog.events.EventWrapper.prototype.listen = function(a, b, c, d, e) {
};
goog.events.EventWrapper.prototype.unlisten = function(a, b, c, d, e) {
};
goog.events.Listenable = function() {
};
goog.events.Listenable.USE_LISTENABLE_INTERFACE = !1;
goog.events.Listenable.IMPLEMENTED_BY_PROP_ = "__closure_listenable";
goog.events.Listenable.addImplementation = function(a) {
  a.prototype[goog.events.Listenable.IMPLEMENTED_BY_PROP_] = !0;
};
goog.events.Listenable.isImplementedBy = function(a) {
  return!(!a || !a[goog.events.Listenable.IMPLEMENTED_BY_PROP_]);
};
goog.events.ListenableKey = function() {
};
goog.events.ListenableKey.counter_ = 0;
goog.events.ListenableKey.reserveKey = function() {
  return++goog.events.ListenableKey.counter_;
};
goog.events.Listener = function() {
  goog.events.Listener.ENABLE_MONITORING && (this.creationStack = Error().stack);
};
goog.events.Listener.ENABLE_MONITORING = !1;
goog.events.Listener.prototype.key = 0;
goog.events.Listener.prototype.removed = !1;
goog.events.Listener.prototype.callOnce = !1;
goog.events.Listener.prototype.init = function(a, b, c, d, e, f) {
  if (goog.isFunction(a)) {
    this.isFunctionListener_ = !0;
  } else {
    if (a && a.handleEvent && goog.isFunction(a.handleEvent)) {
      this.isFunctionListener_ = !1;
    } else {
      throw Error("Invalid listener argument");
    }
  }
  this.listener = a;
  this.proxy = b;
  this.src = c;
  this.type = d;
  this.capture = !!e;
  this.handler = f;
  this.callOnce = !1;
  this.key = goog.events.ListenableKey.reserveKey();
  this.removed = !1;
};
goog.events.Listener.prototype.handleEvent = function(a) {
  return this.isFunctionListener_ ? this.listener.call(this.handler || this.src, a) : this.listener.handleEvent.call(this.listener, a);
};
goog.events.listeners_ = {};
goog.events.listenerTree_ = {};
goog.events.sources_ = {};
goog.events.onString_ = "on";
goog.events.onStringMap_ = {};
goog.events.keySeparator_ = "_";
goog.events.listen = function(a, b, c, d, e) {
  if (goog.isArray(b)) {
    for (var f = 0;f < b.length;f++) {
      goog.events.listen(a, b[f], c, d, e);
    }
    return null;
  }
  a = goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a) ? a.listen(b, goog.events.wrapListener_(c), d, e) : goog.events.listen_(a, b, c, !1, d, e);
  b = a.key;
  goog.events.listeners_[b] = a;
  return b;
};
goog.events.listen_ = function(a, b, c, d, e, f) {
  if (!b) {
    throw Error("Invalid event type");
  }
  e = !!e;
  var g = goog.events.listenerTree_;
  b in g || (g[b] = {count_:0, remaining_:0});
  g = g[b];
  e in g || (g[e] = {count_:0, remaining_:0}, g.count_++);
  var g = g[e], h = goog.getUid(a), k;
  g.remaining_++;
  if (g[h]) {
    k = g[h];
    for (var l = 0;l < k.length;l++) {
      if (g = k[l], g.listener == c && g.handler == f) {
        if (g.removed) {
          break;
        }
        d || (k[l].callOnce = !1);
        return k[l];
      }
    }
  } else {
    k = g[h] = [], g.count_++;
  }
  l = goog.events.getProxy();
  g = new goog.events.Listener;
  g.init(c, l, a, b, e, f);
  g.callOnce = d;
  l.src = a;
  l.listener = g;
  k.push(g);
  goog.events.sources_[h] || (goog.events.sources_[h] = []);
  goog.events.sources_[h].push(g);
  a.addEventListener ? a != goog.global && a.customEvent_ || a.addEventListener(b, l, e) : a.attachEvent(goog.events.getOnString_(b), l);
  return g;
};
goog.events.getProxy = function() {
  var a = goog.events.handleBrowserEvent_, b = goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT ? function(c) {
    return a.call(b.src, b.listener, c);
  } : function(c) {
    c = a.call(b.src, b.listener, c);
    if (!c) {
      return c;
    }
  };
  return b;
};
goog.events.listenOnce = function(a, b, c, d, e) {
  if (goog.isArray(b)) {
    for (var f = 0;f < b.length;f++) {
      goog.events.listenOnce(a, b[f], c, d, e);
    }
    return null;
  }
  a = goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a) ? a.listenOnce(b, goog.events.wrapListener_(c), d, e) : goog.events.listen_(a, b, c, !0, d, e);
  b = a.key;
  goog.events.listeners_[b] = a;
  return b;
};
goog.events.listenWithWrapper = function(a, b, c, d, e) {
  b.listen(a, c, d, e);
};
goog.events.unlisten = function(a, b, c, d, e) {
  if (goog.isArray(b)) {
    for (var f = 0;f < b.length;f++) {
      goog.events.unlisten(a, b[f], c, d, e);
    }
    return null;
  }
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a)) {
    return a.unlisten(b, goog.events.wrapListener_(c), d, e);
  }
  d = !!d;
  a = goog.events.getListeners_(a, b, d);
  if (!a) {
    return!1;
  }
  for (f = 0;f < a.length;f++) {
    if (a[f].listener == c && a[f].capture == d && a[f].handler == e) {
      return goog.events.unlistenByKey(a[f].key);
    }
  }
  return!1;
};
goog.events.unlistenByKey = function(a) {
  var b = goog.events.listeners_[a];
  if (!b || b.removed) {
    return!1;
  }
  var c = b.src;
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(c)) {
    return c.unlistenByKey(b);
  }
  var d = b.type, e = b.proxy, f = b.capture;
  c.removeEventListener ? c != goog.global && c.customEvent_ || c.removeEventListener(d, e, f) : c.detachEvent && c.detachEvent(goog.events.getOnString_(d), e);
  c = goog.getUid(c);
  goog.events.sources_[c] && (e = goog.events.sources_[c], goog.array.remove(e, b), 0 == e.length && delete goog.events.sources_[c]);
  b.removed = !0;
  if (b = goog.events.listenerTree_[d][f][c]) {
    b.needsCleanup_ = !0, goog.events.cleanUp_(d, f, c, b);
  }
  delete goog.events.listeners_[a];
  return!0;
};
goog.events.unlistenWithWrapper = function(a, b, c, d, e) {
  b.unlisten(a, c, d, e);
};
goog.events.cleanUp = function(a) {
  delete goog.events.listeners_[a.key];
};
goog.events.cleanUp_ = function(a, b, c, d) {
  if (!d.locked_ && d.needsCleanup_) {
    for (var e = 0, f = 0;e < d.length;e++) {
      d[e].removed ? d[e].proxy.src = null : (e != f && (d[f] = d[e]), f++);
    }
    d.length = f;
    d.needsCleanup_ = !1;
    0 == f && (delete goog.events.listenerTree_[a][b][c], goog.events.listenerTree_[a][b].count_--, 0 == goog.events.listenerTree_[a][b].count_ && (delete goog.events.listenerTree_[a][b], goog.events.listenerTree_[a].count_--), 0 == goog.events.listenerTree_[a].count_ && delete goog.events.listenerTree_[a]);
  }
};
goog.events.removeAll = function(a, b) {
  var c = 0, d = null == b;
  if (null != a) {
    if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && a && goog.events.Listenable.isImplementedBy(a)) {
      return a.removeAllListeners(b);
    }
    var e = goog.getUid(a);
    if (goog.events.sources_[e]) {
      for (var e = goog.events.sources_[e], f = e.length - 1;0 <= f;f--) {
        var g = e[f];
        if (d || b == g.type) {
          goog.events.unlistenByKey(g.key), c++;
        }
      }
    }
  } else {
    goog.object.forEach(goog.events.listeners_, function(a, b) {
      goog.events.unlistenByKey(b);
      c++;
    });
  }
  return c;
};
goog.events.getListeners = function(a, b, c) {
  return goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a) ? a.getListeners(b, c) : goog.events.getListeners_(a, b, c) || [];
};
goog.events.getListeners_ = function(a, b, c) {
  var d = goog.events.listenerTree_;
  return b in d && (d = d[b], c in d && (d = d[c], a = goog.getUid(a), d[a])) ? d[a] : null;
};
goog.events.getListener = function(a, b, c, d, e) {
  d = !!d;
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a)) {
    return a.getListener(b, goog.events.wrapListener_(c), d, e);
  }
  if (a = goog.events.getListeners_(a, b, d)) {
    for (b = 0;b < a.length;b++) {
      if (!a[b].removed && a[b].listener == c && a[b].capture == d && a[b].handler == e) {
        return a[b];
      }
    }
  }
  return null;
};
goog.events.hasListener = function(a, b, c) {
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a)) {
    return a.hasListener(b, c);
  }
  a = goog.getUid(a);
  var d = goog.events.sources_[a];
  if (d) {
    var e = goog.isDef(b), f = goog.isDef(c);
    return e && f ? (d = goog.events.listenerTree_[b], !!d && !!d[c] && a in d[c]) : e || f ? goog.array.some(d, function(a) {
      return e && a.type == b || f && a.capture == c;
    }) : !0;
  }
  return!1;
};
goog.events.expose = function(a) {
  var b = [], c;
  for (c in a) {
    a[c] && a[c].id ? b.push(c + " \x3d " + a[c] + " (" + a[c].id + ")") : b.push(c + " \x3d " + a[c]);
  }
  return b.join("\n");
};
goog.events.getOnString_ = function(a) {
  return a in goog.events.onStringMap_ ? goog.events.onStringMap_[a] : goog.events.onStringMap_[a] = goog.events.onString_ + a;
};
goog.events.fireListeners = function(a, b, c, d) {
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.isImplementedBy(a)) {
    return a.fireListeners(b, c, d);
  }
  var e = goog.events.listenerTree_;
  return b in e && (e = e[b], c in e) ? goog.events.fireListeners_(e[c], a, b, c, d) : !0;
};
goog.events.fireListeners_ = function(a, b, c, d, e) {
  var f = 1;
  b = goog.getUid(b);
  if (a[b]) {
    var g = --a.remaining_, h = a[b];
    h.locked_ ? h.locked_++ : h.locked_ = 1;
    try {
      for (var k = h.length, l = 0;l < k;l++) {
        var m = h[l];
        m && !m.removed && (f &= !1 !== goog.events.fireListener(m, e));
      }
    } finally {
      a.remaining_ = Math.max(g, a.remaining_), h.locked_--, goog.events.cleanUp_(c, d, b, h);
    }
  }
  return Boolean(f);
};
goog.events.fireListener = function(a, b) {
  a.callOnce && goog.events.unlistenByKey(a.key);
  return a.handleEvent(b);
};
goog.events.getTotalListenerCount = function() {
  return goog.object.getCount(goog.events.listeners_);
};
goog.events.dispatchEvent = function(a, b) {
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE) {
    return a.dispatchEvent(b);
  }
  var c = b.type || b, d = goog.events.listenerTree_;
  if (!(c in d)) {
    return!0;
  }
  if (goog.isString(b)) {
    b = new goog.events.Event(b, a);
  } else {
    if (b instanceof goog.events.Event) {
      b.target = b.target || a;
    } else {
      var e = b;
      b = new goog.events.Event(c, a);
      goog.object.extend(b, e);
    }
  }
  var e = 1, f, d = d[c], c = !0 in d, g;
  if (c) {
    f = [];
    for (g = a;g;g = g.getParentEventTarget()) {
      f.push(g);
    }
    g = d[!0];
    g.remaining_ = g.count_;
    for (var h = f.length - 1;!b.propagationStopped_ && 0 <= h && g.remaining_;h--) {
      b.currentTarget = f[h], e &= goog.events.fireListeners_(g, f[h], b.type, !0, b) && !1 != b.returnValue_;
    }
  }
  if (!1 in d) {
    if (g = d[!1], g.remaining_ = g.count_, c) {
      for (h = 0;!b.propagationStopped_ && h < f.length && g.remaining_;h++) {
        b.currentTarget = f[h], e &= goog.events.fireListeners_(g, f[h], b.type, !1, b) && !1 != b.returnValue_;
      }
    } else {
      for (d = a;!b.propagationStopped_ && d && g.remaining_;d = d.getParentEventTarget()) {
        b.currentTarget = d, e &= goog.events.fireListeners_(g, d, b.type, !1, b) && !1 != b.returnValue_;
      }
    }
  }
  return Boolean(e);
};
goog.events.protectBrowserEventEntryPoint = function(a) {
  goog.events.handleBrowserEvent_ = a.protectEntryPoint(goog.events.handleBrowserEvent_);
};
goog.events.handleBrowserEvent_ = function(a, b) {
  if (a.removed) {
    return!0;
  }
  var c = a.type, d = goog.events.listenerTree_;
  if (!(c in d)) {
    return!0;
  }
  var d = d[c], e, f;
  if (!goog.events.BrowserFeature.HAS_W3C_EVENT_SUPPORT) {
    e = b || goog.getObjectByName("window.event");
    var g = !0 in d, h = !1 in d;
    if (g) {
      if (goog.events.isMarkedIeEvent_(e)) {
        return!0;
      }
      goog.events.markIeEvent_(e);
    }
    var k = new goog.events.BrowserEvent;
    k.init(e, this);
    e = !0;
    try {
      if (g) {
        for (var l = [], m = k.currentTarget;m;m = m.parentNode) {
          l.push(m);
        }
        f = d[!0];
        f.remaining_ = f.count_;
        for (var n = l.length - 1;!k.propagationStopped_ && 0 <= n && f.remaining_;n--) {
          k.currentTarget = l[n], e &= goog.events.fireListeners_(f, l[n], c, !0, k);
        }
        if (h) {
          for (f = d[!1], f.remaining_ = f.count_, n = 0;!k.propagationStopped_ && n < l.length && f.remaining_;n++) {
            k.currentTarget = l[n], e &= goog.events.fireListeners_(f, l[n], c, !1, k);
          }
        }
      } else {
        e = goog.events.fireListener(a, k);
      }
    } finally {
      l && (l.length = 0);
    }
    return e;
  }
  c = new goog.events.BrowserEvent(b, this);
  return e = goog.events.fireListener(a, c);
};
goog.events.markIeEvent_ = function(a) {
  var b = !1;
  if (0 == a.keyCode) {
    try {
      a.keyCode = -1;
      return;
    } catch (c) {
      b = !0;
    }
  }
  if (b || void 0 == a.returnValue) {
    a.returnValue = !0;
  }
};
goog.events.isMarkedIeEvent_ = function(a) {
  return 0 > a.keyCode || void 0 != a.returnValue;
};
goog.events.uniqueIdCounter_ = 0;
goog.events.getUniqueId = function(a) {
  return a + "_" + goog.events.uniqueIdCounter_++;
};
goog.events.LISTENER_WRAPPER_PROP_ = "__closure_events_fn_" + (1E9 * Math.random() >>> 0);
goog.events.wrapListener_ = function(a) {
  return goog.isFunction(a) ? a : a[goog.events.LISTENER_WRAPPER_PROP_] || (a[goog.events.LISTENER_WRAPPER_PROP_] = function(b) {
    return a.handleEvent(b);
  });
};
goog.debug.entryPointRegistry.register(function(a) {
  goog.events.handleBrowserEvent_ = a(goog.events.handleBrowserEvent_);
});
goog.events.EventTarget = function() {
  goog.Disposable.call(this);
  goog.events.Listenable.USE_LISTENABLE_INTERFACE && (this.eventTargetListeners_ = {}, this.reallyDisposed_ = !1, this.actualEventTarget_ = this);
};
goog.inherits(goog.events.EventTarget, goog.Disposable);
goog.events.Listenable.USE_LISTENABLE_INTERFACE && goog.events.Listenable.addImplementation(goog.events.EventTarget);
goog.events.EventTarget.MAX_ANCESTORS_ = 1E3;
goog.events.EventTarget.prototype.customEvent_ = !0;
goog.events.EventTarget.prototype.parentEventTarget_ = null;
goog.events.EventTarget.prototype.getParentEventTarget = function() {
  return this.parentEventTarget_;
};
goog.events.EventTarget.prototype.setParentEventTarget = function(a) {
  this.parentEventTarget_ = a;
};
goog.events.EventTarget.prototype.addEventListener = function(a, b, c, d) {
  goog.events.listen(this, a, b, c, d);
};
goog.events.EventTarget.prototype.removeEventListener = function(a, b, c, d) {
  goog.events.unlisten(this, a, b, c, d);
};
goog.events.EventTarget.prototype.dispatchEvent = function(a) {
  if (goog.events.Listenable.USE_LISTENABLE_INTERFACE) {
    if (this.reallyDisposed_) {
      return!0;
    }
    var b, c = this.getParentEventTarget();
    if (c) {
      b = [];
      for (var d = 1;c;c = c.getParentEventTarget()) {
        b.push(c), goog.asserts.assert(++d < goog.events.EventTarget.MAX_ANCESTORS_, "infinite loop");
      }
    }
    return goog.events.EventTarget.dispatchEventInternal_(this.actualEventTarget_, a, b);
  }
  return goog.events.dispatchEvent(this, a);
};
goog.events.EventTarget.prototype.disposeInternal = function() {
  goog.events.EventTarget.superClass_.disposeInternal.call(this);
  goog.events.Listenable.USE_LISTENABLE_INTERFACE ? (this.removeAllListeners(), this.reallyDisposed_ = !0) : goog.events.removeAll(this);
  this.parentEventTarget_ = null;
};
goog.events.Listenable.USE_LISTENABLE_INTERFACE && (goog.events.EventTarget.prototype.listen = function(a, b, c, d) {
  return this.listenInternal_(a, b, !1, c, d);
}, goog.events.EventTarget.prototype.listenOnce = function(a, b, c, d) {
  return this.listenInternal_(a, b, !0, c, d);
}, goog.events.EventTarget.prototype.listenInternal_ = function(a, b, c, d, e) {
  goog.asserts.assert(!this.reallyDisposed_, "Can not listen on disposed object.");
  var f = this.eventTargetListeners_[a] || (this.eventTargetListeners_[a] = []), g;
  g = goog.events.EventTarget.findListenerIndex_(f, b, d, e);
  if (-1 < g) {
    return g = f[g], c || (g.callOnce = !1), g;
  }
  g = new goog.events.Listener;
  g.init(b, null, this, a, !!d, e);
  g.callOnce = c;
  f.push(g);
  return g;
}, goog.events.EventTarget.prototype.unlisten = function(a, b, c, d) {
  if (!(a in this.eventTargetListeners_)) {
    return!1;
  }
  a = this.eventTargetListeners_[a];
  b = goog.events.EventTarget.findListenerIndex_(a, b, c, d);
  return-1 < b ? (c = a[b], goog.events.cleanUp(c), c.removed = !0, goog.array.removeAt(a, b)) : !1;
}, goog.events.EventTarget.prototype.unlistenByKey = function(a) {
  var b = a.type;
  if (!(b in this.eventTargetListeners_)) {
    return!1;
  }
  if (b = goog.array.remove(this.eventTargetListeners_[b], a)) {
    goog.events.cleanUp(a), a.removed = !0;
  }
  return b;
}, goog.events.EventTarget.prototype.removeAllListeners = function(a, b) {
  var c = 0, d;
  for (d in this.eventTargetListeners_) {
    if (!a || d == a) {
      for (var e = this.eventTargetListeners_[d], f = 0;f < e.length;f++) {
        ++c, goog.events.cleanUp(e[f]), e[f].removed = !0;
      }
      e.length = 0;
    }
  }
  return c;
}, goog.events.EventTarget.prototype.fireListeners = function(a, b, c) {
  goog.asserts.assert(!this.reallyDisposed_, "Can not fire listeners after dispose() completed.");
  if (!(a in this.eventTargetListeners_)) {
    return!0;
  }
  var d = !0;
  a = goog.array.clone(this.eventTargetListeners_[a]);
  for (var e = 0;e < a.length;++e) {
    var f = a[e];
    f && !f.removed && f.capture == b && (f.callOnce && this.unlistenByKey(f), d = !1 !== f.handleEvent(c) && d);
  }
  return d && !1 != c.returnValue_;
}, goog.events.EventTarget.prototype.getListeners = function(a, b) {
  var c = this.eventTargetListeners_[a], d = [];
  if (c) {
    for (var e = 0;e < c.length;++e) {
      var f = c[e];
      f.capture == b && d.push(f);
    }
  }
  return d;
}, goog.events.EventTarget.prototype.getListener = function(a, b, c, d) {
  a = this.eventTargetListeners_[a];
  var e = -1;
  a && (e = goog.events.EventTarget.findListenerIndex_(a, b, c, d));
  return-1 < e ? a[e] : null;
}, goog.events.EventTarget.prototype.hasListener = function(a, b) {
  var c = goog.isDef(a), d = goog.isDef(b);
  return goog.object.some(this.eventTargetListeners_, function(e, f) {
    for (var g = 0;g < e.length;++g) {
      if (!(c && e[g].type != a || d && e[g].capture != b)) {
        return!0;
      }
    }
    return!1;
  });
}, goog.events.EventTarget.prototype.setTargetForTesting = function(a) {
  this.actualEventTarget_ = a;
}, goog.events.EventTarget.dispatchEventInternal_ = function(a, b, c) {
  var d = b.type || b;
  if (goog.isString(b)) {
    b = new goog.events.Event(b, a);
  } else {
    if (b instanceof goog.events.Event) {
      b.target = b.target || a;
    } else {
      var e = b;
      b = new goog.events.Event(d, a);
      goog.object.extend(b, e);
    }
  }
  var e = !0, f;
  if (c) {
    for (var g = c.length - 1;!b.propagationStopped_ && 0 <= g;g--) {
      f = b.currentTarget = c[g], e = f.fireListeners(d, !0, b) && e;
    }
  }
  b.propagationStopped_ || (f = b.currentTarget = a, e = f.fireListeners(d, !0, b) && e, b.propagationStopped_ || (e = f.fireListeners(d, !1, b) && e));
  if (c) {
    for (g = 0;!b.propagationStopped_ && g < c.length;g++) {
      f = b.currentTarget = c[g], e = f.fireListeners(d, !1, b) && e;
    }
  }
  return e;
}, goog.events.EventTarget.findListenerIndex_ = function(a, b, c, d) {
  for (var e = 0;e < a.length;++e) {
    var f = a[e];
    if (f.listener == b && f.capture == !!c && f.handler == d) {
      return e;
    }
  }
  return-1;
});
goog.Timer = function(a, b) {
  goog.events.EventTarget.call(this);
  this.interval_ = a || 1;
  this.timerObject_ = b || goog.Timer.defaultTimerObject;
  this.boundTick_ = goog.bind(this.tick_, this);
  this.last_ = goog.now();
};
goog.inherits(goog.Timer, goog.events.EventTarget);
goog.Timer.MAX_TIMEOUT_ = 2147483647;
goog.Timer.prototype.enabled = !1;
goog.Timer.defaultTimerObject = goog.global;
goog.Timer.intervalScale = 0.8;
goog.Timer.prototype.timer_ = null;
goog.Timer.prototype.getInterval = function() {
  return this.interval_;
};
goog.Timer.prototype.setInterval = function(a) {
  this.interval_ = a;
  this.timer_ && this.enabled ? (this.stop(), this.start()) : this.timer_ && this.stop();
};
goog.Timer.prototype.tick_ = function() {
  if (this.enabled) {
    var a = goog.now() - this.last_;
    0 < a && a < this.interval_ * goog.Timer.intervalScale ? this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_ - a) : (this.dispatchTick(), this.enabled && (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now()));
  }
};
goog.Timer.prototype.dispatchTick = function() {
  this.dispatchEvent(goog.Timer.TICK);
};
goog.Timer.prototype.start = function() {
  this.enabled = !0;
  this.timer_ || (this.timer_ = this.timerObject_.setTimeout(this.boundTick_, this.interval_), this.last_ = goog.now());
};
goog.Timer.prototype.stop = function() {
  this.enabled = !1;
  this.timer_ && (this.timerObject_.clearTimeout(this.timer_), this.timer_ = null);
};
goog.Timer.prototype.disposeInternal = function() {
  goog.Timer.superClass_.disposeInternal.call(this);
  this.stop();
  delete this.timerObject_;
};
goog.Timer.TICK = "tick";
goog.Timer.callOnce = function(a, b, c) {
  if (goog.isFunction(a)) {
    c && (a = goog.bind(a, c));
  } else {
    if (a && "function" == typeof a.handleEvent) {
      a = goog.bind(a.handleEvent, a);
    } else {
      throw Error("Invalid listener argument");
    }
  }
  return b > goog.Timer.MAX_TIMEOUT_ ? -1 : goog.Timer.defaultTimerObject.setTimeout(a, b || 0);
};
goog.Timer.clear = function(a) {
  goog.Timer.defaultTimerObject.clearTimeout(a);
};
goog.structs = {};
goog.structs.getCount = function(a) {
  return "function" == typeof a.getCount ? a.getCount() : goog.isArrayLike(a) || goog.isString(a) ? a.length : goog.object.getCount(a);
};
goog.structs.getValues = function(a) {
  if ("function" == typeof a.getValues) {
    return a.getValues();
  }
  if (goog.isString(a)) {
    return a.split("");
  }
  if (goog.isArrayLike(a)) {
    for (var b = [], c = a.length, d = 0;d < c;d++) {
      b.push(a[d]);
    }
    return b;
  }
  return goog.object.getValues(a);
};
goog.structs.getKeys = function(a) {
  if ("function" == typeof a.getKeys) {
    return a.getKeys();
  }
  if ("function" != typeof a.getValues) {
    if (goog.isArrayLike(a) || goog.isString(a)) {
      var b = [];
      a = a.length;
      for (var c = 0;c < a;c++) {
        b.push(c);
      }
      return b;
    }
    return goog.object.getKeys(a);
  }
};
goog.structs.contains = function(a, b) {
  return "function" == typeof a.contains ? a.contains(b) : "function" == typeof a.containsValue ? a.containsValue(b) : goog.isArrayLike(a) || goog.isString(a) ? goog.array.contains(a, b) : goog.object.containsValue(a, b);
};
goog.structs.isEmpty = function(a) {
  return "function" == typeof a.isEmpty ? a.isEmpty() : goog.isArrayLike(a) || goog.isString(a) ? goog.array.isEmpty(a) : goog.object.isEmpty(a);
};
goog.structs.clear = function(a) {
  "function" == typeof a.clear ? a.clear() : goog.isArrayLike(a) ? goog.array.clear(a) : goog.object.clear(a);
};
goog.structs.forEach = function(a, b, c) {
  if ("function" == typeof a.forEach) {
    a.forEach(b, c);
  } else {
    if (goog.isArrayLike(a) || goog.isString(a)) {
      goog.array.forEach(a, b, c);
    } else {
      for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
        b.call(c, e[g], d && d[g], a);
      }
    }
  }
};
goog.structs.filter = function(a, b, c) {
  if ("function" == typeof a.filter) {
    return a.filter(b, c);
  }
  if (goog.isArrayLike(a) || goog.isString(a)) {
    return goog.array.filter(a, b, c);
  }
  var d, e = goog.structs.getKeys(a), f = goog.structs.getValues(a), g = f.length;
  if (e) {
    d = {};
    for (var h = 0;h < g;h++) {
      b.call(c, f[h], e[h], a) && (d[e[h]] = f[h]);
    }
  } else {
    for (d = [], h = 0;h < g;h++) {
      b.call(c, f[h], void 0, a) && d.push(f[h]);
    }
  }
  return d;
};
goog.structs.map = function(a, b, c) {
  if ("function" == typeof a.map) {
    return a.map(b, c);
  }
  if (goog.isArrayLike(a) || goog.isString(a)) {
    return goog.array.map(a, b, c);
  }
  var d, e = goog.structs.getKeys(a), f = goog.structs.getValues(a), g = f.length;
  if (e) {
    d = {};
    for (var h = 0;h < g;h++) {
      d[e[h]] = b.call(c, f[h], e[h], a);
    }
  } else {
    for (d = [], h = 0;h < g;h++) {
      d[h] = b.call(c, f[h], void 0, a);
    }
  }
  return d;
};
goog.structs.some = function(a, b, c) {
  if ("function" == typeof a.some) {
    return a.some(b, c);
  }
  if (goog.isArrayLike(a) || goog.isString(a)) {
    return goog.array.some(a, b, c);
  }
  for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
    if (b.call(c, e[g], d && d[g], a)) {
      return!0;
    }
  }
  return!1;
};
goog.structs.every = function(a, b, c) {
  if ("function" == typeof a.every) {
    return a.every(b, c);
  }
  if (goog.isArrayLike(a) || goog.isString(a)) {
    return goog.array.every(a, b, c);
  }
  for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
    if (!b.call(c, e[g], d && d[g], a)) {
      return!1;
    }
  }
  return!0;
};
goog.structs.Collection = function() {
};
goog.iter = {};
goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopIteration : Error("StopIteration");
goog.iter.Iterator = function() {
};
goog.iter.Iterator.prototype.next = function() {
  throw goog.iter.StopIteration;
};
goog.iter.Iterator.prototype.__iterator__ = function(a) {
  return this;
};
goog.iter.toIterator = function(a) {
  if (a instanceof goog.iter.Iterator) {
    return a;
  }
  if ("function" == typeof a.__iterator__) {
    return a.__iterator__(!1);
  }
  if (goog.isArrayLike(a)) {
    var b = 0, c = new goog.iter.Iterator;
    c.next = function() {
      for (;;) {
        if (b >= a.length) {
          throw goog.iter.StopIteration;
        }
        if (b in a) {
          return a[b++];
        }
        b++;
      }
    };
    return c;
  }
  throw Error("Not implemented");
};
goog.iter.forEach = function(a, b, c) {
  if (goog.isArrayLike(a)) {
    try {
      goog.array.forEach(a, b, c);
    } catch (d) {
      if (d !== goog.iter.StopIteration) {
        throw d;
      }
    }
  } else {
    a = goog.iter.toIterator(a);
    try {
      for (;;) {
        b.call(c, a.next(), void 0, a);
      }
    } catch (e) {
      if (e !== goog.iter.StopIteration) {
        throw e;
      }
    }
  }
};
goog.iter.filter = function(a, b, c) {
  var d = goog.iter.toIterator(a);
  a = new goog.iter.Iterator;
  a.next = function() {
    for (;;) {
      var a = d.next();
      if (b.call(c, a, void 0, d)) {
        return a;
      }
    }
  };
  return a;
};
goog.iter.range = function(a, b, c) {
  var d = 0, e = a, f = c || 1;
  1 < arguments.length && (d = a, e = b);
  if (0 == f) {
    throw Error("Range step argument must not be zero");
  }
  var g = new goog.iter.Iterator;
  g.next = function() {
    if (0 < f && d >= e || 0 > f && d <= e) {
      throw goog.iter.StopIteration;
    }
    var a = d;
    d += f;
    return a;
  };
  return g;
};
goog.iter.join = function(a, b) {
  return goog.iter.toArray(a).join(b);
};
goog.iter.map = function(a, b, c) {
  var d = goog.iter.toIterator(a);
  a = new goog.iter.Iterator;
  a.next = function() {
    for (;;) {
      var a = d.next();
      return b.call(c, a, void 0, d);
    }
  };
  return a;
};
goog.iter.reduce = function(a, b, c, d) {
  var e = c;
  goog.iter.forEach(a, function(a) {
    e = b.call(d, e, a);
  });
  return e;
};
goog.iter.some = function(a, b, c) {
  a = goog.iter.toIterator(a);
  try {
    for (;;) {
      if (b.call(c, a.next(), void 0, a)) {
        return!0;
      }
    }
  } catch (d) {
    if (d !== goog.iter.StopIteration) {
      throw d;
    }
  }
  return!1;
};
goog.iter.every = function(a, b, c) {
  a = goog.iter.toIterator(a);
  try {
    for (;;) {
      if (!b.call(c, a.next(), void 0, a)) {
        return!1;
      }
    }
  } catch (d) {
    if (d !== goog.iter.StopIteration) {
      throw d;
    }
  }
  return!0;
};
goog.iter.chain = function(a) {
  var b = arguments, c = b.length, d = 0, e = new goog.iter.Iterator;
  e.next = function() {
    try {
      if (d >= c) {
        throw goog.iter.StopIteration;
      }
      return goog.iter.toIterator(b[d]).next();
    } catch (a) {
      if (a !== goog.iter.StopIteration || d >= c) {
        throw a;
      }
      d++;
      return this.next();
    }
  };
  return e;
};
goog.iter.dropWhile = function(a, b, c) {
  var d = goog.iter.toIterator(a);
  a = new goog.iter.Iterator;
  var e = !0;
  a.next = function() {
    for (;;) {
      var a = d.next();
      if (!e || !b.call(c, a, void 0, d)) {
        return e = !1, a;
      }
    }
  };
  return a;
};
goog.iter.takeWhile = function(a, b, c) {
  var d = goog.iter.toIterator(a);
  a = new goog.iter.Iterator;
  var e = !0;
  a.next = function() {
    for (;;) {
      if (e) {
        var a = d.next();
        if (b.call(c, a, void 0, d)) {
          return a;
        }
        e = !1;
      } else {
        throw goog.iter.StopIteration;
      }
    }
  };
  return a;
};
goog.iter.toArray = function(a) {
  if (goog.isArrayLike(a)) {
    return goog.array.toArray(a);
  }
  a = goog.iter.toIterator(a);
  var b = [];
  goog.iter.forEach(a, function(a) {
    b.push(a);
  });
  return b;
};
goog.iter.equals = function(a, b) {
  a = goog.iter.toIterator(a);
  b = goog.iter.toIterator(b);
  var c, d;
  try {
    for (;;) {
      c = d = !1;
      var e = a.next();
      c = !0;
      var f = b.next();
      d = !0;
      if (e != f) {
        break;
      }
    }
  } catch (g) {
    if (g !== goog.iter.StopIteration) {
      throw g;
    }
    if (c && !d) {
      return!1;
    }
    if (!d) {
      try {
        b.next();
      } catch (h) {
        if (h !== goog.iter.StopIteration) {
          throw h;
        }
        return!0;
      }
    }
  }
  return!1;
};
goog.iter.nextOrValue = function(a, b) {
  try {
    return goog.iter.toIterator(a).next();
  } catch (c) {
    if (c != goog.iter.StopIteration) {
      throw c;
    }
    return b;
  }
};
goog.iter.product = function(a) {
  if (goog.array.some(arguments, function(a) {
    return!a.length;
  }) || !arguments.length) {
    return new goog.iter.Iterator;
  }
  var b = new goog.iter.Iterator, c = arguments, d = goog.array.repeat(0, c.length);
  b.next = function() {
    if (d) {
      for (var a = goog.array.map(d, function(a, b) {
        return c[b][a];
      }), b = d.length - 1;0 <= b;b--) {
        goog.asserts.assert(d);
        if (d[b] < c[b].length - 1) {
          d[b]++;
          break;
        }
        if (0 == b) {
          d = null;
          break;
        }
        d[b] = 0;
      }
      return a;
    }
    throw goog.iter.StopIteration;
  };
  return b;
};
goog.iter.cycle = function(a) {
  var b = goog.iter.toIterator(a), c = [], d = 0;
  a = new goog.iter.Iterator;
  var e = !1;
  a.next = function() {
    var a = null;
    if (!e) {
      try {
        return a = b.next(), c.push(a), a;
      } catch (g) {
        if (g != goog.iter.StopIteration || goog.array.isEmpty(c)) {
          throw g;
        }
        e = !0;
      }
    }
    a = c[d];
    d = (d + 1) % c.length;
    return a;
  };
  return a;
};
goog.structs.Map = function(a, b) {
  this.map_ = {};
  this.keys_ = [];
  var c = arguments.length;
  if (1 < c) {
    if (c % 2) {
      throw Error("Uneven number of arguments");
    }
    for (var d = 0;d < c;d += 2) {
      this.set(arguments[d], arguments[d + 1]);
    }
  } else {
    a && this.addAll(a);
  }
};
goog.structs.Map.prototype.count_ = 0;
goog.structs.Map.prototype.version_ = 0;
goog.structs.Map.prototype.getCount = function() {
  return this.count_;
};
goog.structs.Map.prototype.getValues = function() {
  this.cleanupKeysArray_();
  for (var a = [], b = 0;b < this.keys_.length;b++) {
    a.push(this.map_[this.keys_[b]]);
  }
  return a;
};
goog.structs.Map.prototype.getKeys = function() {
  this.cleanupKeysArray_();
  return this.keys_.concat();
};
goog.structs.Map.prototype.containsKey = function(a) {
  return goog.structs.Map.hasKey_(this.map_, a);
};
goog.structs.Map.prototype.containsValue = function(a) {
  for (var b = 0;b < this.keys_.length;b++) {
    var c = this.keys_[b];
    if (goog.structs.Map.hasKey_(this.map_, c) && this.map_[c] == a) {
      return!0;
    }
  }
  return!1;
};
goog.structs.Map.prototype.equals = function(a, b) {
  if (this === a) {
    return!0;
  }
  if (this.count_ != a.getCount()) {
    return!1;
  }
  var c = b || goog.structs.Map.defaultEquals;
  this.cleanupKeysArray_();
  for (var d, e = 0;d = this.keys_[e];e++) {
    if (!c(this.get(d), a.get(d))) {
      return!1;
    }
  }
  return!0;
};
goog.structs.Map.defaultEquals = function(a, b) {
  return a === b;
};
goog.structs.Map.prototype.isEmpty = function() {
  return 0 == this.count_;
};
goog.structs.Map.prototype.clear = function() {
  this.map_ = {};
  this.version_ = this.count_ = this.keys_.length = 0;
};
goog.structs.Map.prototype.remove = function(a) {
  return goog.structs.Map.hasKey_(this.map_, a) ? (delete this.map_[a], this.count_--, this.version_++, this.keys_.length > 2 * this.count_ && this.cleanupKeysArray_(), !0) : !1;
};
goog.structs.Map.prototype.cleanupKeysArray_ = function() {
  if (this.count_ != this.keys_.length) {
    for (var a = 0, b = 0;a < this.keys_.length;) {
      var c = this.keys_[a];
      goog.structs.Map.hasKey_(this.map_, c) && (this.keys_[b++] = c);
      a++;
    }
    this.keys_.length = b;
  }
  if (this.count_ != this.keys_.length) {
    for (var d = {}, b = a = 0;a < this.keys_.length;) {
      c = this.keys_[a], goog.structs.Map.hasKey_(d, c) || (this.keys_[b++] = c, d[c] = 1), a++;
    }
    this.keys_.length = b;
  }
};
goog.structs.Map.prototype.get = function(a, b) {
  return goog.structs.Map.hasKey_(this.map_, a) ? this.map_[a] : b;
};
goog.structs.Map.prototype.set = function(a, b) {
  goog.structs.Map.hasKey_(this.map_, a) || (this.count_++, this.keys_.push(a), this.version_++);
  this.map_[a] = b;
};
goog.structs.Map.prototype.addAll = function(a) {
  var b;
  a instanceof goog.structs.Map ? (b = a.getKeys(), a = a.getValues()) : (b = goog.object.getKeys(a), a = goog.object.getValues(a));
  for (var c = 0;c < b.length;c++) {
    this.set(b[c], a[c]);
  }
};
goog.structs.Map.prototype.clone = function() {
  return new goog.structs.Map(this);
};
goog.structs.Map.prototype.transpose = function() {
  for (var a = new goog.structs.Map, b = 0;b < this.keys_.length;b++) {
    var c = this.keys_[b];
    a.set(this.map_[c], c);
  }
  return a;
};
goog.structs.Map.prototype.toObject = function() {
  this.cleanupKeysArray_();
  for (var a = {}, b = 0;b < this.keys_.length;b++) {
    var c = this.keys_[b];
    a[c] = this.map_[c];
  }
  return a;
};
goog.structs.Map.prototype.getKeyIterator = function() {
  return this.__iterator__(!0);
};
goog.structs.Map.prototype.getValueIterator = function() {
  return this.__iterator__(!1);
};
goog.structs.Map.prototype.__iterator__ = function(a) {
  this.cleanupKeysArray_();
  var b = 0, c = this.keys_, d = this.map_, e = this.version_, f = this, g = new goog.iter.Iterator;
  g.next = function() {
    for (;;) {
      if (e != f.version_) {
        throw Error("The map has changed since the iterator was created");
      }
      if (b >= c.length) {
        throw goog.iter.StopIteration;
      }
      var g = c[b++];
      return a ? g : d[g];
    }
  };
  return g;
};
goog.structs.Map.hasKey_ = function(a, b) {
  return Object.prototype.hasOwnProperty.call(a, b);
};
goog.structs.Set = function(a) {
  this.map_ = new goog.structs.Map;
  a && this.addAll(a);
};
goog.structs.Set.getKey_ = function(a) {
  var b = typeof a;
  return "object" == b && a || "function" == b ? "o" + goog.getUid(a) : b.substr(0, 1) + a;
};
goog.structs.Set.prototype.getCount = function() {
  return this.map_.getCount();
};
goog.structs.Set.prototype.add = function(a) {
  this.map_.set(goog.structs.Set.getKey_(a), a);
};
goog.structs.Set.prototype.addAll = function(a) {
  a = goog.structs.getValues(a);
  for (var b = a.length, c = 0;c < b;c++) {
    this.add(a[c]);
  }
};
goog.structs.Set.prototype.removeAll = function(a) {
  a = goog.structs.getValues(a);
  for (var b = a.length, c = 0;c < b;c++) {
    this.remove(a[c]);
  }
};
goog.structs.Set.prototype.remove = function(a) {
  return this.map_.remove(goog.structs.Set.getKey_(a));
};
goog.structs.Set.prototype.clear = function() {
  this.map_.clear();
};
goog.structs.Set.prototype.isEmpty = function() {
  return this.map_.isEmpty();
};
goog.structs.Set.prototype.contains = function(a) {
  return this.map_.containsKey(goog.structs.Set.getKey_(a));
};
goog.structs.Set.prototype.containsAll = function(a) {
  return goog.structs.every(a, this.contains, this);
};
goog.structs.Set.prototype.intersection = function(a) {
  var b = new goog.structs.Set;
  a = goog.structs.getValues(a);
  for (var c = 0;c < a.length;c++) {
    var d = a[c];
    this.contains(d) && b.add(d);
  }
  return b;
};
goog.structs.Set.prototype.difference = function(a) {
  var b = this.clone();
  b.removeAll(a);
  return b;
};
goog.structs.Set.prototype.getValues = function() {
  return this.map_.getValues();
};
goog.structs.Set.prototype.clone = function() {
  return new goog.structs.Set(this);
};
goog.structs.Set.prototype.equals = function(a) {
  return this.getCount() == goog.structs.getCount(a) && this.isSubsetOf(a);
};
goog.structs.Set.prototype.isSubsetOf = function(a) {
  var b = goog.structs.getCount(a);
  if (this.getCount() > b) {
    return!1;
  }
  !(a instanceof goog.structs.Set) && 5 < b && (a = new goog.structs.Set(a));
  return goog.structs.every(this, function(b) {
    return goog.structs.contains(a, b);
  });
};
goog.structs.Set.prototype.__iterator__ = function(a) {
  return this.map_.__iterator__(!1);
};
goog.debug.catchErrors = function(a, b, c) {
  c = c || goog.global;
  var d = c.onerror, e = !!b;
  goog.userAgent.WEBKIT && !goog.userAgent.isVersion("535.3") && (e = !e);
  c.onerror = function(b, c, h) {
    d && d(b, c, h);
    a({message:b, fileName:c, line:h});
    return e;
  };
};
goog.debug.expose = function(a, b) {
  if ("undefined" == typeof a) {
    return "undefined";
  }
  if (null == a) {
    return "NULL";
  }
  var c = [], d;
  for (d in a) {
    if (b || !goog.isFunction(a[d])) {
      var e = d + " \x3d ";
      try {
        e += a[d];
      } catch (f) {
        e += "*** " + f + " ***";
      }
      c.push(e);
    }
  }
  return c.join("\n");
};
goog.debug.deepExpose = function(a, b) {
  var c = new goog.structs.Set, d = [], e = function(a, g) {
    var h = g + "  ";
    try {
      if (goog.isDef(a)) {
        if (goog.isNull(a)) {
          d.push("NULL");
        } else {
          if (goog.isString(a)) {
            d.push('"' + a.replace(/\n/g, "\n" + g) + '"');
          } else {
            if (goog.isFunction(a)) {
              d.push(String(a).replace(/\n/g, "\n" + g));
            } else {
              if (goog.isObject(a)) {
                if (c.contains(a)) {
                  d.push("*** reference loop detected ***");
                } else {
                  c.add(a);
                  d.push("{");
                  for (var k in a) {
                    if (b || !goog.isFunction(a[k])) {
                      d.push("\n"), d.push(h), d.push(k + " \x3d "), e(a[k], h);
                    }
                  }
                  d.push("\n" + g + "}");
                }
              } else {
                d.push(a);
              }
            }
          }
        }
      } else {
        d.push("undefined");
      }
    } catch (l) {
      d.push("*** " + l + " ***");
    }
  };
  e(a, "");
  return d.join("");
};
goog.debug.exposeArray = function(a) {
  for (var b = [], c = 0;c < a.length;c++) {
    goog.isArray(a[c]) ? b.push(goog.debug.exposeArray(a[c])) : b.push(a[c]);
  }
  return "[ " + b.join(", ") + " ]";
};
goog.debug.exposeException = function(a, b) {
  try {
    var c = goog.debug.normalizeErrorObject(a);
    return "Message: " + goog.string.htmlEscape(c.message) + '\nUrl: \x3ca href\x3d"view-source:' + c.fileName + '" target\x3d"_new"\x3e' + c.fileName + "\x3c/a\x3e\nLine: " + c.lineNumber + "\n\nBrowser stack:\n" + goog.string.htmlEscape(c.stack + "-\x3e ") + "[end]\n\nJS stack traversal:\n" + goog.string.htmlEscape(goog.debug.getStacktrace(b) + "-\x3e ");
  } catch (d) {
    return "Exception trying to expose exception! You win, we lose. " + d;
  }
};
goog.debug.normalizeErrorObject = function(a) {
  var b = goog.getObjectByName("window.location.href");
  if (goog.isString(a)) {
    return{message:a, name:"Unknown error", lineNumber:"Not available", fileName:b, stack:"Not available"};
  }
  var c, d, e = !1;
  try {
    c = a.lineNumber || a.line || "Not available";
  } catch (f) {
    c = "Not available", e = !0;
  }
  try {
    d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b;
  } catch (g) {
    d = "Not available", e = !0;
  }
  return!e && a.lineNumber && a.fileName && a.stack ? a : {message:a.message, name:a.name, lineNumber:c, fileName:d, stack:a.stack || "Not available"};
};
goog.debug.enhanceError = function(a, b) {
  var c = "string" == typeof a ? Error(a) : a;
  c.stack || (c.stack = goog.debug.getStacktrace(arguments.callee.caller));
  if (b) {
    for (var d = 0;c["message" + d];) {
      ++d;
    }
    c["message" + d] = String(b);
  }
  return c;
};
goog.debug.getStacktraceSimple = function(a) {
  for (var b = [], c = arguments.callee.caller, d = 0;c && (!a || d < a);) {
    b.push(goog.debug.getFunctionName(c));
    b.push("()\n");
    try {
      c = c.caller;
    } catch (e) {
      b.push("[exception trying to get caller]\n");
      break;
    }
    d++;
    if (d >= goog.debug.MAX_STACK_DEPTH) {
      b.push("[...long stack...]");
      break;
    }
  }
  a && d >= a ? b.push("[...reached max depth limit...]") : b.push("[end]");
  return b.join("");
};
goog.debug.MAX_STACK_DEPTH = 50;
goog.debug.getStacktrace = function(a) {
  return goog.debug.getStacktraceHelper_(a || arguments.callee.caller, []);
};
goog.debug.getStacktraceHelper_ = function(a, b) {
  var c = [];
  if (goog.array.contains(b, a)) {
    c.push("[...circular reference...]");
  } else {
    if (a && b.length < goog.debug.MAX_STACK_DEPTH) {
      c.push(goog.debug.getFunctionName(a) + "(");
      for (var d = a.arguments, e = 0;e < d.length;e++) {
        0 < e && c.push(", ");
        var f;
        f = d[e];
        switch(typeof f) {
          case "object":
            f = f ? "object" : "null";
            break;
          case "string":
            break;
          case "number":
            f = String(f);
            break;
          case "boolean":
            f = f ? "true" : "false";
            break;
          case "function":
            f = (f = goog.debug.getFunctionName(f)) ? f : "[fn]";
            break;
          default:
            f = typeof f;
        }
        40 < f.length && (f = f.substr(0, 40) + "...");
        c.push(f);
      }
      b.push(a);
      c.push(")\n");
      try {
        c.push(goog.debug.getStacktraceHelper_(a.caller, b));
      } catch (g) {
        c.push("[exception trying to get caller]\n");
      }
    } else {
      a ? c.push("[...long stack...]") : c.push("[end]");
    }
  }
  return c.join("");
};
goog.debug.setFunctionResolver = function(a) {
  goog.debug.fnNameResolver_ = a;
};
goog.debug.getFunctionName = function(a) {
  if (goog.debug.fnNameCache_[a]) {
    return goog.debug.fnNameCache_[a];
  }
  if (goog.debug.fnNameResolver_) {
    var b = goog.debug.fnNameResolver_(a);
    if (b) {
      return goog.debug.fnNameCache_[a] = b;
    }
  }
  a = String(a);
  goog.debug.fnNameCache_[a] || (b = /function ([^\(]+)/.exec(a), goog.debug.fnNameCache_[a] = b ? b[1] : "[Anonymous]");
  return goog.debug.fnNameCache_[a];
};
goog.debug.makeWhitespaceVisible = function(a) {
  return a.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]");
};
goog.debug.fnNameCache_ = {};
goog.debug.LogRecord = function(a, b, c, d, e) {
  this.reset(a, b, c, d, e);
};
goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
goog.debug.LogRecord.prototype.exception_ = null;
goog.debug.LogRecord.prototype.exceptionText_ = null;
goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS = !0;
goog.debug.LogRecord.nextSequenceNumber_ = 0;
goog.debug.LogRecord.prototype.reset = function(a, b, c, d, e) {
  goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS && (this.sequenceNumber_ = "number" == typeof e ? e : goog.debug.LogRecord.nextSequenceNumber_++);
  this.time_ = d || goog.now();
  this.level_ = a;
  this.msg_ = b;
  this.loggerName_ = c;
  delete this.exception_;
  delete this.exceptionText_;
};
goog.debug.LogRecord.prototype.getLoggerName = function() {
  return this.loggerName_;
};
goog.debug.LogRecord.prototype.getException = function() {
  return this.exception_;
};
goog.debug.LogRecord.prototype.setException = function(a) {
  this.exception_ = a;
};
goog.debug.LogRecord.prototype.getExceptionText = function() {
  return this.exceptionText_;
};
goog.debug.LogRecord.prototype.setExceptionText = function(a) {
  this.exceptionText_ = a;
};
goog.debug.LogRecord.prototype.setLoggerName = function(a) {
  this.loggerName_ = a;
};
goog.debug.LogRecord.prototype.getLevel = function() {
  return this.level_;
};
goog.debug.LogRecord.prototype.setLevel = function(a) {
  this.level_ = a;
};
goog.debug.LogRecord.prototype.getMessage = function() {
  return this.msg_;
};
goog.debug.LogRecord.prototype.setMessage = function(a) {
  this.msg_ = a;
};
goog.debug.LogRecord.prototype.getMillis = function() {
  return this.time_;
};
goog.debug.LogRecord.prototype.setMillis = function(a) {
  this.time_ = a;
};
goog.debug.LogRecord.prototype.getSequenceNumber = function() {
  return this.sequenceNumber_;
};
goog.debug.LogBuffer = function() {
  goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");
  this.clear();
};
goog.debug.LogBuffer.getInstance = function() {
  goog.debug.LogBuffer.instance_ || (goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer);
  return goog.debug.LogBuffer.instance_;
};
goog.debug.LogBuffer.CAPACITY = 0;
goog.debug.LogBuffer.prototype.addRecord = function(a, b, c) {
  var d = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
  this.curIndex_ = d;
  if (this.isFull_) {
    return d = this.buffer_[d], d.reset(a, b, c), d;
  }
  this.isFull_ = d == goog.debug.LogBuffer.CAPACITY - 1;
  return this.buffer_[d] = new goog.debug.LogRecord(a, b, c);
};
goog.debug.LogBuffer.isBufferingEnabled = function() {
  return 0 < goog.debug.LogBuffer.CAPACITY;
};
goog.debug.LogBuffer.prototype.clear = function() {
  this.buffer_ = Array(goog.debug.LogBuffer.CAPACITY);
  this.curIndex_ = -1;
  this.isFull_ = !1;
};
goog.debug.LogBuffer.prototype.forEachRecord = function(a) {
  var b = this.buffer_;
  if (b[0]) {
    var c = this.curIndex_, d = this.isFull_ ? c : -1;
    do {
      d = (d + 1) % goog.debug.LogBuffer.CAPACITY, a(b[d]);
    } while (d != c);
  }
};
goog.debug.Logger = function(a) {
  this.name_ = a;
};
goog.debug.Logger.prototype.parent_ = null;
goog.debug.Logger.prototype.level_ = null;
goog.debug.Logger.prototype.children_ = null;
goog.debug.Logger.prototype.handlers_ = null;
goog.debug.Logger.ENABLE_HIERARCHY = !0;
goog.debug.Logger.ENABLE_HIERARCHY || (goog.debug.Logger.rootHandlers_ = []);
goog.debug.Logger.Level = function(a, b) {
  this.name = a;
  this.value = b;
};
goog.debug.Logger.Level.prototype.toString = function() {
  return this.name;
};
goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
goog.debug.Logger.Level.predefinedLevelsCache_ = null;
goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {
  goog.debug.Logger.Level.predefinedLevelsCache_ = {};
  for (var a = 0, b;b = goog.debug.Logger.Level.PREDEFINED_LEVELS[a];a++) {
    goog.debug.Logger.Level.predefinedLevelsCache_[b.value] = b, goog.debug.Logger.Level.predefinedLevelsCache_[b.name] = b;
  }
};
goog.debug.Logger.Level.getPredefinedLevel = function(a) {
  goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
  return goog.debug.Logger.Level.predefinedLevelsCache_[a] || null;
};
goog.debug.Logger.Level.getPredefinedLevelByValue = function(a) {
  goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
  if (a in goog.debug.Logger.Level.predefinedLevelsCache_) {
    return goog.debug.Logger.Level.predefinedLevelsCache_[a];
  }
  for (var b = 0;b < goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++b) {
    var c = goog.debug.Logger.Level.PREDEFINED_LEVELS[b];
    if (c.value <= a) {
      return c;
    }
  }
  return null;
};
goog.debug.Logger.getLogger = function(a) {
  return goog.debug.LogManager.getLogger(a);
};
goog.debug.Logger.logToProfilers = function(a) {
  goog.global.console && (goog.global.console.timeStamp ? goog.global.console.timeStamp(a) : goog.global.console.markTimeline && goog.global.console.markTimeline(a));
  goog.global.msWriteProfilerMark && goog.global.msWriteProfilerMark(a);
};
goog.debug.Logger.prototype.getName = function() {
  return this.name_;
};
goog.debug.Logger.prototype.addHandler = function(a) {
  goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a));
};
goog.debug.Logger.prototype.removeHandler = function(a) {
  var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
  return!!b && goog.array.remove(b, a);
};
goog.debug.Logger.prototype.getParent = function() {
  return this.parent_;
};
goog.debug.Logger.prototype.getChildren = function() {
  this.children_ || (this.children_ = {});
  return this.children_;
};
goog.debug.Logger.prototype.setLevel = function(a) {
  goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a);
};
goog.debug.Logger.prototype.getLevel = function() {
  return this.level_;
};
goog.debug.Logger.prototype.getEffectiveLevel = function() {
  if (!goog.debug.Logger.ENABLE_HIERARCHY) {
    return goog.debug.Logger.rootLevel_;
  }
  if (this.level_) {
    return this.level_;
  }
  if (this.parent_) {
    return this.parent_.getEffectiveLevel();
  }
  goog.asserts.fail("Root logger has no level set.");
  return null;
};
goog.debug.Logger.prototype.isLoggable = function(a) {
  return a.value >= this.getEffectiveLevel().value;
};
goog.debug.Logger.prototype.log = function(a, b, c) {
  this.isLoggable(a) && this.doLogRecord_(this.getLogRecord(a, b, c));
};
goog.debug.Logger.prototype.getLogRecord = function(a, b, c) {
  var d = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
  c && (d.setException(c), d.setExceptionText(goog.debug.exposeException(c, arguments.callee.caller)));
  return d;
};
goog.debug.Logger.prototype.shout = function(a, b) {
  this.log(goog.debug.Logger.Level.SHOUT, a, b);
};
goog.debug.Logger.prototype.severe = function(a, b) {
  this.log(goog.debug.Logger.Level.SEVERE, a, b);
};
goog.debug.Logger.prototype.warning = function(a, b) {
  this.log(goog.debug.Logger.Level.WARNING, a, b);
};
goog.debug.Logger.prototype.info = function(a, b) {
  this.log(goog.debug.Logger.Level.INFO, a, b);
};
goog.debug.Logger.prototype.config = function(a, b) {
  this.log(goog.debug.Logger.Level.CONFIG, a, b);
};
goog.debug.Logger.prototype.fine = function(a, b) {
  this.log(goog.debug.Logger.Level.FINE, a, b);
};
goog.debug.Logger.prototype.finer = function(a, b) {
  this.log(goog.debug.Logger.Level.FINER, a, b);
};
goog.debug.Logger.prototype.finest = function(a, b) {
  this.log(goog.debug.Logger.Level.FINEST, a, b);
};
goog.debug.Logger.prototype.logRecord = function(a) {
  this.isLoggable(a.getLevel()) && this.doLogRecord_(a);
};
goog.debug.Logger.prototype.doLogRecord_ = function(a) {
  goog.debug.Logger.logToProfilers("log:" + a.getMessage());
  if (goog.debug.Logger.ENABLE_HIERARCHY) {
    for (var b = this;b;) {
      b.callPublish_(a), b = b.getParent();
    }
  } else {
    for (var b = 0, c;c = goog.debug.Logger.rootHandlers_[b++];) {
      c(a);
    }
  }
};
goog.debug.Logger.prototype.callPublish_ = function(a) {
  if (this.handlers_) {
    for (var b = 0, c;c = this.handlers_[b];b++) {
      c(a);
    }
  }
};
goog.debug.Logger.prototype.setParent_ = function(a) {
  this.parent_ = a;
};
goog.debug.Logger.prototype.addChild_ = function(a, b) {
  this.getChildren()[a] = b;
};
goog.debug.LogManager = {};
goog.debug.LogManager.loggers_ = {};
goog.debug.LogManager.rootLogger_ = null;
goog.debug.LogManager.initialize = function() {
  goog.debug.LogManager.rootLogger_ || (goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(""), goog.debug.LogManager.loggers_[""] = goog.debug.LogManager.rootLogger_, goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG));
};
goog.debug.LogManager.getLoggers = function() {
  return goog.debug.LogManager.loggers_;
};
goog.debug.LogManager.getRoot = function() {
  goog.debug.LogManager.initialize();
  return goog.debug.LogManager.rootLogger_;
};
goog.debug.LogManager.getLogger = function(a) {
  goog.debug.LogManager.initialize();
  return goog.debug.LogManager.loggers_[a] || goog.debug.LogManager.createLogger_(a);
};
goog.debug.LogManager.createFunctionForCatchErrors = function(a) {
  return function(b) {
    (a || goog.debug.LogManager.getRoot()).severe("Error: " + b.message + " (" + b.fileName + " @ Line: " + b.line + ")");
  };
};
goog.debug.LogManager.createLogger_ = function(a) {
  var b = new goog.debug.Logger(a);
  if (goog.debug.Logger.ENABLE_HIERARCHY) {
    var c = a.lastIndexOf("."), d = a.substr(0, c), c = a.substr(c + 1), d = goog.debug.LogManager.getLogger(d);
    d.addChild_(c, b);
    b.setParent_(d);
  }
  return goog.debug.LogManager.loggers_[a] = b;
};
goog.json = {};
goog.json.isValid_ = function(a) {
  return/^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""));
};
goog.json.parse = function(a) {
  a = String(a);
  if (goog.json.isValid_(a)) {
    try {
      return eval("(" + a + ")");
    } catch (b) {
    }
  }
  throw Error("Invalid JSON string: " + a);
};
goog.json.unsafeParse = function(a) {
  return eval("(" + a + ")");
};
goog.json.serialize = function(a, b) {
  return(new goog.json.Serializer(b)).serialize(a);
};
goog.json.Serializer = function(a) {
  this.replacer_ = a;
};
goog.json.Serializer.prototype.serialize = function(a) {
  var b = [];
  this.serialize_(a, b);
  return b.join("");
};
goog.json.Serializer.prototype.serialize_ = function(a, b) {
  switch(typeof a) {
    case "string":
      this.serializeString_(a, b);
      break;
    case "number":
      this.serializeNumber_(a, b);
      break;
    case "boolean":
      b.push(a);
      break;
    case "undefined":
      b.push("null");
      break;
    case "object":
      if (null == a) {
        b.push("null");
        break;
      }
      if (goog.isArray(a)) {
        this.serializeArray(a, b);
        break;
      }
      this.serializeObject_(a, b);
      break;
    case "function":
      break;
    default:
      throw Error("Unknown type: " + typeof a);;
  }
};
goog.json.Serializer.charToJsonCharCache_ = {'"':'\\"', "\\":"\\\\", "/":"\\/", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\u000b"};
goog.json.Serializer.charsToReplace_ = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
goog.json.Serializer.prototype.serializeString_ = function(a, b) {
  b.push('"', a.replace(goog.json.Serializer.charsToReplace_, function(a) {
    if (a in goog.json.Serializer.charToJsonCharCache_) {
      return goog.json.Serializer.charToJsonCharCache_[a];
    }
    var b = a.charCodeAt(0), e = "\\u";
    16 > b ? e += "000" : 256 > b ? e += "00" : 4096 > b && (e += "0");
    return goog.json.Serializer.charToJsonCharCache_[a] = e + b.toString(16);
  }), '"');
};
goog.json.Serializer.prototype.serializeNumber_ = function(a, b) {
  b.push(isFinite(a) && !isNaN(a) ? a : "null");
};
goog.json.Serializer.prototype.serializeArray = function(a, b) {
  var c = a.length;
  b.push("[");
  for (var d = "", e = 0;e < c;e++) {
    b.push(d), d = a[e], this.serialize_(this.replacer_ ? this.replacer_.call(a, String(e), d) : d, b), d = ",";
  }
  b.push("]");
};
goog.json.Serializer.prototype.serializeObject_ = function(a, b) {
  b.push("{");
  var c = "", d;
  for (d in a) {
    if (Object.prototype.hasOwnProperty.call(a, d)) {
      var e = a[d];
      "function" != typeof e && (b.push(c), this.serializeString_(d, b), b.push(":"), this.serialize_(this.replacer_ ? this.replacer_.call(a, d, e) : e, b), c = ",");
    }
  }
  b.push("}");
};
goog.net = {};
goog.net.ErrorCode = {NO_ERROR:0, ACCESS_DENIED:1, FILE_NOT_FOUND:2, FF_SILENT_ERROR:3, CUSTOM_ERROR:4, EXCEPTION:5, HTTP_ERROR:6, ABORT:7, TIMEOUT:8, OFFLINE:9};
goog.net.ErrorCode.getDebugMessage = function(a) {
  switch(a) {
    case goog.net.ErrorCode.NO_ERROR:
      return "No Error";
    case goog.net.ErrorCode.ACCESS_DENIED:
      return "Access denied to content document";
    case goog.net.ErrorCode.FILE_NOT_FOUND:
      return "File not found";
    case goog.net.ErrorCode.FF_SILENT_ERROR:
      return "Firefox silently errored";
    case goog.net.ErrorCode.CUSTOM_ERROR:
      return "Application custom error";
    case goog.net.ErrorCode.EXCEPTION:
      return "An exception occurred";
    case goog.net.ErrorCode.HTTP_ERROR:
      return "Http response at 400 or 500 level";
    case goog.net.ErrorCode.ABORT:
      return "Request was aborted";
    case goog.net.ErrorCode.TIMEOUT:
      return "Request timed out";
    case goog.net.ErrorCode.OFFLINE:
      return "The resource is not available offline";
    default:
      return "Unrecognized error code";
  }
};
goog.net.EventType = {COMPLETE:"complete", SUCCESS:"success", ERROR:"error", ABORT:"abort", READY:"ready", READY_STATE_CHANGE:"readystatechange", TIMEOUT:"timeout", INCREMENTAL_DATA:"incrementaldata", PROGRESS:"progress"};
goog.net.HttpStatus = {CONTINUE:100, SWITCHING_PROTOCOLS:101, OK:200, CREATED:201, ACCEPTED:202, NON_AUTHORITATIVE_INFORMATION:203, NO_CONTENT:204, RESET_CONTENT:205, PARTIAL_CONTENT:206, MULTIPLE_CHOICES:300, MOVED_PERMANENTLY:301, FOUND:302, SEE_OTHER:303, NOT_MODIFIED:304, USE_PROXY:305, TEMPORARY_REDIRECT:307, BAD_REQUEST:400, UNAUTHORIZED:401, PAYMENT_REQUIRED:402, FORBIDDEN:403, NOT_FOUND:404, METHOD_NOT_ALLOWED:405, NOT_ACCEPTABLE:406, PROXY_AUTHENTICATION_REQUIRED:407, REQUEST_TIMEOUT:408, 
CONFLICT:409, GONE:410, LENGTH_REQUIRED:411, PRECONDITION_FAILED:412, REQUEST_ENTITY_TOO_LARGE:413, REQUEST_URI_TOO_LONG:414, UNSUPPORTED_MEDIA_TYPE:415, REQUEST_RANGE_NOT_SATISFIABLE:416, EXPECTATION_FAILED:417, INTERNAL_SERVER_ERROR:500, NOT_IMPLEMENTED:501, BAD_GATEWAY:502, SERVICE_UNAVAILABLE:503, GATEWAY_TIMEOUT:504, HTTP_VERSION_NOT_SUPPORTED:505, QUIRK_IE_NO_CONTENT:1223};
goog.net.HttpStatus.isSuccess = function(a) {
  switch(a) {
    case goog.net.HttpStatus.OK:
    ;
    case goog.net.HttpStatus.CREATED:
    ;
    case goog.net.HttpStatus.ACCEPTED:
    ;
    case goog.net.HttpStatus.NO_CONTENT:
    ;
    case goog.net.HttpStatus.PARTIAL_CONTENT:
    ;
    case goog.net.HttpStatus.NOT_MODIFIED:
    ;
    case goog.net.HttpStatus.QUIRK_IE_NO_CONTENT:
      return!0;
    default:
      return!1;
  }
};
goog.net.XmlHttpFactory = function() {
};
goog.net.XmlHttpFactory.prototype.cachedOptions_ = null;
goog.net.XmlHttpFactory.prototype.getOptions = function() {
  return this.cachedOptions_ || (this.cachedOptions_ = this.internalGetOptions());
};
goog.net.WrapperXmlHttpFactory = function(a, b) {
  goog.net.XmlHttpFactory.call(this);
  this.xhrFactory_ = a;
  this.optionsFactory_ = b;
};
goog.inherits(goog.net.WrapperXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.WrapperXmlHttpFactory.prototype.createInstance = function() {
  return this.xhrFactory_();
};
goog.net.WrapperXmlHttpFactory.prototype.getOptions = function() {
  return this.optionsFactory_();
};
goog.net.XmlHttp = function() {
  return goog.net.XmlHttp.factory_.createInstance();
};
goog.net.XmlHttp.ASSUME_NATIVE_XHR = !1;
goog.net.XmlHttp.getOptions = function() {
  return goog.net.XmlHttp.factory_.getOptions();
};
goog.net.XmlHttp.OptionType = {USE_NULL_FUNCTION:0, LOCAL_REQUEST_ERROR:1};
goog.net.XmlHttp.ReadyState = {UNINITIALIZED:0, LOADING:1, LOADED:2, INTERACTIVE:3, COMPLETE:4};
goog.net.XmlHttp.setFactory = function(a, b) {
  goog.net.XmlHttp.setGlobalFactory(new goog.net.WrapperXmlHttpFactory(a, b));
};
goog.net.XmlHttp.setGlobalFactory = function(a) {
  goog.net.XmlHttp.factory_ = a;
};
goog.net.DefaultXmlHttpFactory = function() {
  goog.net.XmlHttpFactory.call(this);
};
goog.inherits(goog.net.DefaultXmlHttpFactory, goog.net.XmlHttpFactory);
goog.net.DefaultXmlHttpFactory.prototype.createInstance = function() {
  var a = this.getProgId_();
  return a ? new ActiveXObject(a) : new XMLHttpRequest;
};
goog.net.DefaultXmlHttpFactory.prototype.internalGetOptions = function() {
  var a = {};
  this.getProgId_() && (a[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] = !0, a[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] = !0);
  return a;
};
goog.net.DefaultXmlHttpFactory.prototype.getProgId_ = function() {
  if (goog.net.XmlHttp.ASSUME_NATIVE_XHR) {
    return "";
  }
  if (!this.ieProgId_ && "undefined" == typeof XMLHttpRequest && "undefined" != typeof ActiveXObject) {
    for (var a = ["MSXML2.XMLHTTP.6.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"], b = 0;b < a.length;b++) {
      var c = a[b];
      try {
        return new ActiveXObject(c), this.ieProgId_ = c;
      } catch (d) {
      }
    }
    throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");
  }
  return this.ieProgId_;
};
goog.net.XmlHttp.setGlobalFactory(new goog.net.DefaultXmlHttpFactory);
goog.uri = {};
goog.uri.utils = {};
goog.uri.utils.CharCode_ = {AMPERSAND:38, EQUAL:61, HASH:35, QUESTION:63};
goog.uri.utils.buildFromEncodedParts = function(a, b, c, d, e, f, g) {
  var h = "";
  a && (h += a + ":");
  c && (h += "//", b && (h += b + "@"), h += c, d && (h += ":" + d));
  e && (h += e);
  f && (h += "?" + f);
  g && (h += "#" + g);
  return h;
};
goog.uri.utils.splitRe_ = RegExp("^(?:([^:/?#.]+):)?(?://(?:([^/?#]*)@)?([^/#?]*?)(?::([0-9]+))?(?\x3d[/#?]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#(.*))?$");
goog.uri.utils.ComponentIndex = {SCHEME:1, USER_INFO:2, DOMAIN:3, PORT:4, PATH:5, QUERY_DATA:6, FRAGMENT:7};
goog.uri.utils.split = function(a) {
  return a.match(goog.uri.utils.splitRe_);
};
goog.uri.utils.decodeIfPossible_ = function(a) {
  return a && decodeURIComponent(a);
};
goog.uri.utils.getComponentByIndex_ = function(a, b) {
  return goog.uri.utils.split(b)[a] || null;
};
goog.uri.utils.getScheme = function(a) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.SCHEME, a);
};
goog.uri.utils.getEffectiveScheme = function(a) {
  a = goog.uri.utils.getScheme(a);
  !a && self.location && (a = self.location.protocol, a = a.substr(0, a.length - 1));
  return a ? a.toLowerCase() : "";
};
goog.uri.utils.getUserInfoEncoded = function(a) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.USER_INFO, a);
};
goog.uri.utils.getUserInfo = function(a) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getUserInfoEncoded(a));
};
goog.uri.utils.getDomainEncoded = function(a) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.DOMAIN, a);
};
goog.uri.utils.getDomain = function(a) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getDomainEncoded(a));
};
goog.uri.utils.getPort = function(a) {
  return Number(goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PORT, a)) || null;
};
goog.uri.utils.getPathEncoded = function(a) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.PATH, a);
};
goog.uri.utils.getPath = function(a) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getPathEncoded(a));
};
goog.uri.utils.getQueryData = function(a) {
  return goog.uri.utils.getComponentByIndex_(goog.uri.utils.ComponentIndex.QUERY_DATA, a);
};
goog.uri.utils.getFragmentEncoded = function(a) {
  var b = a.indexOf("#");
  return 0 > b ? null : a.substr(b + 1);
};
goog.uri.utils.setFragmentEncoded = function(a, b) {
  return goog.uri.utils.removeFragment(a) + (b ? "#" + b : "");
};
goog.uri.utils.getFragment = function(a) {
  return goog.uri.utils.decodeIfPossible_(goog.uri.utils.getFragmentEncoded(a));
};
goog.uri.utils.getHost = function(a) {
  a = goog.uri.utils.split(a);
  return goog.uri.utils.buildFromEncodedParts(a[goog.uri.utils.ComponentIndex.SCHEME], a[goog.uri.utils.ComponentIndex.USER_INFO], a[goog.uri.utils.ComponentIndex.DOMAIN], a[goog.uri.utils.ComponentIndex.PORT]);
};
goog.uri.utils.getPathAndAfter = function(a) {
  a = goog.uri.utils.split(a);
  return goog.uri.utils.buildFromEncodedParts(null, null, null, null, a[goog.uri.utils.ComponentIndex.PATH], a[goog.uri.utils.ComponentIndex.QUERY_DATA], a[goog.uri.utils.ComponentIndex.FRAGMENT]);
};
goog.uri.utils.removeFragment = function(a) {
  var b = a.indexOf("#");
  return 0 > b ? a : a.substr(0, b);
};
goog.uri.utils.haveSameDomain = function(a, b) {
  var c = goog.uri.utils.split(a), d = goog.uri.utils.split(b);
  return c[goog.uri.utils.ComponentIndex.DOMAIN] == d[goog.uri.utils.ComponentIndex.DOMAIN] && c[goog.uri.utils.ComponentIndex.SCHEME] == d[goog.uri.utils.ComponentIndex.SCHEME] && c[goog.uri.utils.ComponentIndex.PORT] == d[goog.uri.utils.ComponentIndex.PORT];
};
goog.uri.utils.assertNoFragmentsOrQueries_ = function(a) {
  if (goog.DEBUG && (0 <= a.indexOf("#") || 0 <= a.indexOf("?"))) {
    throw Error("goog.uri.utils: Fragment or query identifiers are not supported: [" + a + "]");
  }
};
goog.uri.utils.appendQueryData_ = function(a) {
  if (a[1]) {
    var b = a[0], c = b.indexOf("#");
    0 <= c && (a.push(b.substr(c)), a[0] = b = b.substr(0, c));
    c = b.indexOf("?");
    0 > c ? a[1] = "?" : c == b.length - 1 && (a[1] = void 0);
  }
  return a.join("");
};
goog.uri.utils.appendKeyValuePairs_ = function(a, b, c) {
  if (goog.isArray(b)) {
    goog.asserts.assertArray(b);
    for (var d = 0;d < b.length;d++) {
      goog.uri.utils.appendKeyValuePairs_(a, String(b[d]), c);
    }
  } else {
    null != b && c.push("\x26", a, "" === b ? "" : "\x3d", goog.string.urlEncode(b));
  }
};
goog.uri.utils.buildQueryDataBuffer_ = function(a, b, c) {
  goog.asserts.assert(0 == Math.max(b.length - (c || 0), 0) % 2, "goog.uri.utils: Key/value lists must be even in length.");
  for (c = c || 0;c < b.length;c += 2) {
    goog.uri.utils.appendKeyValuePairs_(b[c], b[c + 1], a);
  }
  return a;
};
goog.uri.utils.buildQueryData = function(a, b) {
  var c = goog.uri.utils.buildQueryDataBuffer_([], a, b);
  c[0] = "";
  return c.join("");
};
goog.uri.utils.buildQueryDataBufferFromMap_ = function(a, b) {
  for (var c in b) {
    goog.uri.utils.appendKeyValuePairs_(c, b[c], a);
  }
  return a;
};
goog.uri.utils.buildQueryDataFromMap = function(a) {
  a = goog.uri.utils.buildQueryDataBufferFromMap_([], a);
  a[0] = "";
  return a.join("");
};
goog.uri.utils.appendParams = function(a, b) {
  return goog.uri.utils.appendQueryData_(2 == arguments.length ? goog.uri.utils.buildQueryDataBuffer_([a], arguments[1], 0) : goog.uri.utils.buildQueryDataBuffer_([a], arguments, 1));
};
goog.uri.utils.appendParamsFromMap = function(a, b) {
  return goog.uri.utils.appendQueryData_(goog.uri.utils.buildQueryDataBufferFromMap_([a], b));
};
goog.uri.utils.appendParam = function(a, b, c) {
  return goog.uri.utils.appendQueryData_([a, "\x26", b, "\x3d", goog.string.urlEncode(c)]);
};
goog.uri.utils.findParam_ = function(a, b, c, d) {
  for (var e = c.length;0 <= (b = a.indexOf(c, b)) && b < d;) {
    var f = a.charCodeAt(b - 1);
    if (f == goog.uri.utils.CharCode_.AMPERSAND || f == goog.uri.utils.CharCode_.QUESTION) {
      if (f = a.charCodeAt(b + e), !f || f == goog.uri.utils.CharCode_.EQUAL || f == goog.uri.utils.CharCode_.AMPERSAND || f == goog.uri.utils.CharCode_.HASH) {
        return b;
      }
    }
    b += e + 1;
  }
  return-1;
};
goog.uri.utils.hashOrEndRe_ = /#|$/;
goog.uri.utils.hasParam = function(a, b) {
  return 0 <= goog.uri.utils.findParam_(a, 0, b, a.search(goog.uri.utils.hashOrEndRe_));
};
goog.uri.utils.getParamValue = function(a, b) {
  var c = a.search(goog.uri.utils.hashOrEndRe_), d = goog.uri.utils.findParam_(a, 0, b, c);
  if (0 > d) {
    return null;
  }
  var e = a.indexOf("\x26", d);
  if (0 > e || e > c) {
    e = c;
  }
  d += b.length + 1;
  return goog.string.urlDecode(a.substr(d, e - d));
};
goog.uri.utils.getParamValues = function(a, b) {
  for (var c = a.search(goog.uri.utils.hashOrEndRe_), d = 0, e, f = [];0 <= (e = goog.uri.utils.findParam_(a, d, b, c));) {
    d = a.indexOf("\x26", e);
    if (0 > d || d > c) {
      d = c;
    }
    e += b.length + 1;
    f.push(goog.string.urlDecode(a.substr(e, d - e)));
  }
  return f;
};
goog.uri.utils.trailingQueryPunctuationRe_ = /[?&]($|#)/;
goog.uri.utils.removeParam = function(a, b) {
  for (var c = a.search(goog.uri.utils.hashOrEndRe_), d = 0, e, f = [];0 <= (e = goog.uri.utils.findParam_(a, d, b, c));) {
    f.push(a.substring(d, e)), d = Math.min(a.indexOf("\x26", e) + 1 || c, c);
  }
  f.push(a.substr(d));
  return f.join("").replace(goog.uri.utils.trailingQueryPunctuationRe_, "$1");
};
goog.uri.utils.setParam = function(a, b, c) {
  return goog.uri.utils.appendParam(goog.uri.utils.removeParam(a, b), b, c);
};
goog.uri.utils.appendPath = function(a, b) {
  goog.uri.utils.assertNoFragmentsOrQueries_(a);
  goog.string.endsWith(a, "/") && (a = a.substr(0, a.length - 1));
  goog.string.startsWith(b, "/") && (b = b.substr(1));
  return goog.string.buildString(a, "/", b);
};
goog.uri.utils.StandardQueryParam = {RANDOM:"zx"};
goog.uri.utils.makeUnique = function(a) {
  return goog.uri.utils.setParam(a, goog.uri.utils.StandardQueryParam.RANDOM, goog.string.getRandomString());
};
goog.net.XhrIo = function(a) {
  goog.events.EventTarget.call(this);
  this.headers = new goog.structs.Map;
  this.xmlHttpFactory_ = a || null;
};
goog.inherits(goog.net.XhrIo, goog.events.EventTarget);
goog.net.XhrIo.ResponseType = {DEFAULT:"", TEXT:"text", DOCUMENT:"document", BLOB:"blob", ARRAY_BUFFER:"arraybuffer"};
goog.net.XhrIo.prototype.logger_ = goog.debug.Logger.getLogger("goog.net.XhrIo");
goog.net.XhrIo.CONTENT_TYPE_HEADER = "Content-Type";
goog.net.XhrIo.HTTP_SCHEME_PATTERN = /^https?$/i;
goog.net.XhrIo.FORM_CONTENT_TYPE = "application/x-www-form-urlencoded;charset\x3dutf-8";
goog.net.XhrIo.sendInstances_ = [];
goog.net.XhrIo.send = function(a, b, c, d, e, f, g) {
  var h = new goog.net.XhrIo;
  goog.net.XhrIo.sendInstances_.push(h);
  b && goog.events.listen(h, goog.net.EventType.COMPLETE, b);
  goog.events.listen(h, goog.net.EventType.READY, goog.partial(goog.net.XhrIo.cleanupSend_, h));
  f && h.setTimeoutInterval(f);
  g && h.setWithCredentials(g);
  h.send(a, c, d, e);
};
goog.net.XhrIo.cleanup = function() {
  for (var a = goog.net.XhrIo.sendInstances_;a.length;) {
    a.pop().dispose();
  }
};
goog.net.XhrIo.protectEntryPoints = function(a) {
  goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = a.protectEntryPoint(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);
};
goog.net.XhrIo.cleanupSend_ = function(a) {
  a.dispose();
  goog.array.remove(goog.net.XhrIo.sendInstances_, a);
};
goog.net.XhrIo.prototype.active_ = !1;
goog.net.XhrIo.prototype.xhr_ = null;
goog.net.XhrIo.prototype.xhrOptions_ = null;
goog.net.XhrIo.prototype.lastUri_ = "";
goog.net.XhrIo.prototype.lastMethod_ = "";
goog.net.XhrIo.prototype.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
goog.net.XhrIo.prototype.lastError_ = "";
goog.net.XhrIo.prototype.errorDispatched_ = !1;
goog.net.XhrIo.prototype.inSend_ = !1;
goog.net.XhrIo.prototype.inOpen_ = !1;
goog.net.XhrIo.prototype.inAbort_ = !1;
goog.net.XhrIo.prototype.timeoutInterval_ = 0;
goog.net.XhrIo.prototype.timeoutId_ = null;
goog.net.XhrIo.prototype.responseType_ = goog.net.XhrIo.ResponseType.DEFAULT;
goog.net.XhrIo.prototype.withCredentials_ = !1;
goog.net.XhrIo.prototype.getTimeoutInterval = function() {
  return this.timeoutInterval_;
};
goog.net.XhrIo.prototype.setTimeoutInterval = function(a) {
  this.timeoutInterval_ = Math.max(0, a);
};
goog.net.XhrIo.prototype.setResponseType = function(a) {
  this.responseType_ = a;
};
goog.net.XhrIo.prototype.getResponseType = function() {
  return this.responseType_;
};
goog.net.XhrIo.prototype.setWithCredentials = function(a) {
  this.withCredentials_ = a;
};
goog.net.XhrIo.prototype.getWithCredentials = function() {
  return this.withCredentials_;
};
goog.net.XhrIo.prototype.send = function(a, b, c, d) {
  if (this.xhr_) {
    throw Error("[goog.net.XhrIo] Object is active with another request\x3d" + this.lastUri_ + "; newUri\x3d" + a);
  }
  b = b ? b.toUpperCase() : "GET";
  this.lastUri_ = a;
  this.lastError_ = "";
  this.lastErrorCode_ = goog.net.ErrorCode.NO_ERROR;
  this.lastMethod_ = b;
  this.errorDispatched_ = !1;
  this.active_ = !0;
  this.xhr_ = this.createXhr();
  this.xhrOptions_ = this.xmlHttpFactory_ ? this.xmlHttpFactory_.getOptions() : goog.net.XmlHttp.getOptions();
  this.xhr_.onreadystatechange = goog.bind(this.onReadyStateChange_, this);
  try {
    this.logger_.fine(this.formatMsg_("Opening Xhr")), this.inOpen_ = !0, this.xhr_.open(b, a, !0), this.inOpen_ = !1;
  } catch (e) {
    this.logger_.fine(this.formatMsg_("Error opening Xhr: " + e.message));
    this.error_(goog.net.ErrorCode.EXCEPTION, e);
    return;
  }
  a = c || "";
  var f = this.headers.clone();
  d && goog.structs.forEach(d, function(a, b) {
    f.set(b, a);
  });
  d = goog.global.FormData && a instanceof goog.global.FormData;
  "POST" != b || f.containsKey(goog.net.XhrIo.CONTENT_TYPE_HEADER) || d || f.set(goog.net.XhrIo.CONTENT_TYPE_HEADER, goog.net.XhrIo.FORM_CONTENT_TYPE);
  goog.structs.forEach(f, function(a, b) {
    this.xhr_.setRequestHeader(b, a);
  }, this);
  this.responseType_ && (this.xhr_.responseType = this.responseType_);
  goog.object.containsKey(this.xhr_, "withCredentials") && (this.xhr_.withCredentials = this.withCredentials_);
  try {
    this.timeoutId_ && (goog.Timer.defaultTimerObject.clearTimeout(this.timeoutId_), this.timeoutId_ = null), 0 < this.timeoutInterval_ && (this.logger_.fine(this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete")), this.timeoutId_ = goog.Timer.defaultTimerObject.setTimeout(goog.bind(this.timeout_, this), this.timeoutInterval_)), this.logger_.fine(this.formatMsg_("Sending request")), this.inSend_ = !0, this.xhr_.send(a), this.inSend_ = !1;
  } catch (g) {
    this.logger_.fine(this.formatMsg_("Send error: " + g.message)), this.error_(goog.net.ErrorCode.EXCEPTION, g);
  }
};
goog.net.XhrIo.prototype.createXhr = function() {
  return this.xmlHttpFactory_ ? this.xmlHttpFactory_.createInstance() : goog.net.XmlHttp();
};
goog.net.XhrIo.prototype.timeout_ = function() {
  "undefined" != typeof goog && this.xhr_ && (this.lastError_ = "Timed out after " + this.timeoutInterval_ + "ms, aborting", this.lastErrorCode_ = goog.net.ErrorCode.TIMEOUT, this.logger_.fine(this.formatMsg_(this.lastError_)), this.dispatchEvent(goog.net.EventType.TIMEOUT), this.abort(goog.net.ErrorCode.TIMEOUT));
};
goog.net.XhrIo.prototype.error_ = function(a, b) {
  this.active_ = !1;
  this.xhr_ && (this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1);
  this.lastError_ = b;
  this.lastErrorCode_ = a;
  this.dispatchErrors_();
  this.cleanUpXhr_();
};
goog.net.XhrIo.prototype.dispatchErrors_ = function() {
  this.errorDispatched_ || (this.errorDispatched_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.ERROR));
};
goog.net.XhrIo.prototype.abort = function(a) {
  this.xhr_ && this.active_ && (this.logger_.fine(this.formatMsg_("Aborting")), this.active_ = !1, this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1, this.lastErrorCode_ = a || goog.net.ErrorCode.ABORT, this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.ABORT), this.cleanUpXhr_());
};
goog.net.XhrIo.prototype.disposeInternal = function() {
  this.xhr_ && (this.active_ && (this.active_ = !1, this.inAbort_ = !0, this.xhr_.abort(), this.inAbort_ = !1), this.cleanUpXhr_(!0));
  goog.net.XhrIo.superClass_.disposeInternal.call(this);
};
goog.net.XhrIo.prototype.onReadyStateChange_ = function() {
  if (this.inOpen_ || this.inSend_ || this.inAbort_) {
    this.onReadyStateChangeHelper_();
  } else {
    this.onReadyStateChangeEntryPoint_();
  }
};
goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = function() {
  this.onReadyStateChangeHelper_();
};
goog.net.XhrIo.prototype.onReadyStateChangeHelper_ = function() {
  if (this.active_ && "undefined" != typeof goog) {
    if (this.xhrOptions_[goog.net.XmlHttp.OptionType.LOCAL_REQUEST_ERROR] && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE && 2 == this.getStatus()) {
      this.logger_.fine(this.formatMsg_("Local request error detected and ignored"));
    } else {
      if (this.inSend_ && this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE) {
        goog.Timer.defaultTimerObject.setTimeout(goog.bind(this.onReadyStateChange_, this), 0);
      } else {
        if (this.dispatchEvent(goog.net.EventType.READY_STATE_CHANGE), this.isComplete()) {
          this.logger_.fine(this.formatMsg_("Request complete"));
          this.active_ = !1;
          try {
            this.isSuccess() ? (this.dispatchEvent(goog.net.EventType.COMPLETE), this.dispatchEvent(goog.net.EventType.SUCCESS)) : (this.lastErrorCode_ = goog.net.ErrorCode.HTTP_ERROR, this.lastError_ = this.getStatusText() + " [" + this.getStatus() + "]", this.dispatchErrors_());
          } finally {
            this.cleanUpXhr_();
          }
        }
      }
    }
  }
};
goog.net.XhrIo.prototype.cleanUpXhr_ = function(a) {
  if (this.xhr_) {
    var b = this.xhr_, c = this.xhrOptions_[goog.net.XmlHttp.OptionType.USE_NULL_FUNCTION] ? goog.nullFunction : null;
    this.xhrOptions_ = this.xhr_ = null;
    this.timeoutId_ && (goog.Timer.defaultTimerObject.clearTimeout(this.timeoutId_), this.timeoutId_ = null);
    a || this.dispatchEvent(goog.net.EventType.READY);
    try {
      b.onreadystatechange = c;
    } catch (d) {
      this.logger_.severe("Problem encountered resetting onreadystatechange: " + d.message);
    }
  }
};
goog.net.XhrIo.prototype.isActive = function() {
  return!!this.xhr_;
};
goog.net.XhrIo.prototype.isComplete = function() {
  return this.getReadyState() == goog.net.XmlHttp.ReadyState.COMPLETE;
};
goog.net.XhrIo.prototype.isSuccess = function() {
  var a = this.getStatus();
  return goog.net.HttpStatus.isSuccess(a) || 0 === a && !this.isLastUriEffectiveSchemeHttp_();
};
goog.net.XhrIo.prototype.isLastUriEffectiveSchemeHttp_ = function() {
  var a = goog.uri.utils.getEffectiveScheme(String(this.lastUri_));
  return goog.net.XhrIo.HTTP_SCHEME_PATTERN.test(a);
};
goog.net.XhrIo.prototype.getReadyState = function() {
  return this.xhr_ ? this.xhr_.readyState : goog.net.XmlHttp.ReadyState.UNINITIALIZED;
};
goog.net.XhrIo.prototype.getStatus = function() {
  try {
    return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.status : -1;
  } catch (a) {
    return this.logger_.warning("Can not get status: " + a.message), -1;
  }
};
goog.net.XhrIo.prototype.getStatusText = function() {
  try {
    return this.getReadyState() > goog.net.XmlHttp.ReadyState.LOADED ? this.xhr_.statusText : "";
  } catch (a) {
    return this.logger_.fine("Can not get status: " + a.message), "";
  }
};
goog.net.XhrIo.prototype.getLastUri = function() {
  return String(this.lastUri_);
};
goog.net.XhrIo.prototype.getResponseText = function() {
  try {
    return this.xhr_ ? this.xhr_.responseText : "";
  } catch (a) {
    return this.logger_.fine("Can not get responseText: " + a.message), "";
  }
};
goog.net.XhrIo.prototype.getResponseBody = function() {
  try {
    if (this.xhr_ && "responseBody" in this.xhr_) {
      return this.xhr_.responseBody;
    }
  } catch (a) {
    this.logger_.fine("Can not get responseBody: " + a.message);
  }
  return null;
};
goog.net.XhrIo.prototype.getResponseXml = function() {
  try {
    return this.xhr_ ? this.xhr_.responseXML : null;
  } catch (a) {
    return this.logger_.fine("Can not get responseXML: " + a.message), null;
  }
};
goog.net.XhrIo.prototype.getResponseJson = function(a) {
  if (this.xhr_) {
    var b = this.xhr_.responseText;
    a && 0 == b.indexOf(a) && (b = b.substring(a.length));
    return goog.json.parse(b);
  }
};
goog.net.XhrIo.prototype.getResponse = function() {
  try {
    if (!this.xhr_) {
      return null;
    }
    if ("response" in this.xhr_) {
      return this.xhr_.response;
    }
    switch(this.responseType_) {
      case goog.net.XhrIo.ResponseType.DEFAULT:
      ;
      case goog.net.XhrIo.ResponseType.TEXT:
        return this.xhr_.responseText;
      case goog.net.XhrIo.ResponseType.ARRAY_BUFFER:
        if ("mozResponseArrayBuffer" in this.xhr_) {
          return this.xhr_.mozResponseArrayBuffer;
        }
      ;
    }
    this.logger_.severe("Response type " + this.responseType_ + " is not supported on this browser");
    return null;
  } catch (a) {
    return this.logger_.fine("Can not get response: " + a.message), null;
  }
};
goog.net.XhrIo.prototype.getResponseHeader = function(a) {
  return this.xhr_ && this.isComplete() ? this.xhr_.getResponseHeader(a) : void 0;
};
goog.net.XhrIo.prototype.getAllResponseHeaders = function() {
  return this.xhr_ && this.isComplete() ? this.xhr_.getAllResponseHeaders() : "";
};
goog.net.XhrIo.prototype.getLastErrorCode = function() {
  return this.lastErrorCode_;
};
goog.net.XhrIo.prototype.getLastError = function() {
  return goog.isString(this.lastError_) ? this.lastError_ : String(this.lastError_);
};
goog.net.XhrIo.prototype.formatMsg_ = function(a) {
  return a + " [" + this.lastMethod_ + " " + this.lastUri_ + " " + this.getStatus() + "]";
};
goog.debug.entryPointRegistry.register(function(a) {
  goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_ = a(goog.net.XhrIo.prototype.onReadyStateChangeEntryPoint_);
});
lt.util.dom = {};
lt.util.dom.lazy_nl_via_item = function() {
  var a = null, b = function(b) {
    return a.call(null, b, 0);
  }, c = function(b, c) {
    return c < b.length ? new cljs.core.LazySeq(null, function() {
      return cljs.core.cons.call(null, b.item(c), a.call(null, b, c + 1));
    }, null, null) : null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
HTMLCollection.prototype.cljs$core$IIndexed$ = !0;
HTMLCollection.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  return this.item(b);
};
HTMLCollection.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  a = this.item(b);
  return cljs.core.truth_(a) ? a : c;
};
HTMLCollection.prototype.cljs$core$ICounted$ = !0;
HTMLCollection.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.length;
};
HTMLCollection.prototype.cljs$core$ISeqable$ = !0;
HTMLCollection.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return lt.util.dom.lazy_nl_via_item.call(null, this);
};
NodeList.prototype.cljs$core$IIndexed$ = !0;
NodeList.prototype.cljs$core$IIndexed$_nth$arity$2 = function(a, b) {
  return this.item(b);
};
NodeList.prototype.cljs$core$IIndexed$_nth$arity$3 = function(a, b, c) {
  a = this.item(b);
  return cljs.core.truth_(a) ? a : c;
};
NodeList.prototype.cljs$core$ICounted$ = !0;
NodeList.prototype.cljs$core$ICounted$_count$arity$1 = function(a) {
  return this.length;
};
NodeList.prototype.cljs$core$ISeqable$ = !0;
NodeList.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return lt.util.dom.lazy_nl_via_item.call(null, this);
};
lt.util.dom.text_node = function(a) {
  return document.createTextNode(a);
};
lt.util.dom.$$ = function() {
  var a = null, b = function(b) {
    return a.call(null, b, document);
  }, c = function(a, b) {
    return b.querySelectorAll(cljs.core.name.call(null, a));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.util.dom.$ = function() {
  var a = null, b = function(b) {
    return a.call(null, b, document);
  }, c = function(a, b) {
    return b.querySelector(cljs.core.name.call(null, a));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.util.dom.append = function(a, b) {
  a.appendChild(b);
  return a;
};
lt.util.dom.prepend = function(a, b) {
  return cljs.core.truth_(a.firstChild) ? a.insertBefore(b, a.firstChild) : lt.util.dom.append.call(null, a, b);
};
lt.util.dom.add_class = function(a, b) {
  return cljs.core.truth_(cljs.core.truth_(a) ? !cljs.core.empty_QMARK_.call(null, cljs.core.name.call(null, b)) : a) ? a.classList.add(cljs.core.name.call(null, b)) : null;
};
lt.util.dom.remove_class = function(a, b) {
  return cljs.core.truth_(cljs.core.truth_(a) ? !cljs.core.empty_QMARK_.call(null, cljs.core.name.call(null, b)) : a) ? a.classList.remove(cljs.core.name.call(null, b)) : null;
};
lt.util.dom.has_class_QMARK_ = function(a, b) {
  return cljs.core.truth_(cljs.core.truth_(a) ? !cljs.core.empty_QMARK_.call(null, cljs.core.name.call(null, b)) : a) ? a.classList.contains(cljs.core.name.call(null, b)) : null;
};
lt.util.dom.toggle_class = function(a, b) {
  return cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null, a, b)) ? lt.util.dom.remove_class.call(null, a, b) : lt.util.dom.add_class.call(null, a, b);
};
lt.util.dom.set_css = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      a.style[cljs.core.name.call(null, h)] = g instanceof cljs.core.Keyword ? cljs.core.name.call(null, g) : g;
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, c), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), a.style[cljs.core.name.call(null, h)] = g instanceof cljs.core.Keyword ? cljs.core.name.call(null, g) : g, c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.util.dom.css = function(a, b) {
  var c = cljs.core._EQ_.call(null, Object, cljs.core.type.call(null, b)) ? cljs.core.js__GT_clj.call(null, b) : b;
  return cljs.core.map_QMARK_.call(null, c) ? lt.util.dom.set_css.call(null, a, c) : a.style[cljs.core.name.call(null, c)];
};
lt.util.dom.set_attr = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      a.setAttribute(cljs.core.name.call(null, h), g instanceof cljs.core.Keyword ? cljs.core.name.call(null, g) : g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, c), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), a.setAttribute(cljs.core.name.call(null, h), g instanceof cljs.core.Keyword ? cljs.core.name.call(null, g) : g), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.util.dom.attr = function(a, b) {
  return cljs.core.map_QMARK_.call(null, b) ? lt.util.dom.set_attr.call(null, a, b) : a.getAttribute(cljs.core.name.call(null, b));
};
lt.util.dom.parent = function(a) {
  return a.parentNode;
};
lt.util.dom.children = function(a) {
  return a.children;
};
lt.util.dom.remove = function(a) {
  var b = lt.util.dom.parent.call(null, a);
  return cljs.core.truth_(b) ? b.removeChild(a) : null;
};
lt.util.dom.empty = function(a) {
  return a.innerHTML = "";
};
lt.util.dom.val = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null);
    return cljs.core.not.call(null, e) ? a.value : a.value = e;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.dom.prevent = function(a) {
  return a.preventDefault();
};
lt.util.dom.stop_propagation = function(a) {
  return a.stopPropagation();
};
lt.util.dom.siblings = function(a) {
  return lt.util.dom.parent.call(null, a).children;
};
lt.util.dom.parents = function(a, b) {
  for (var c = lt.util.dom.parent.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652))), d = lt.util.dom.parent.call(null, a);;) {
    if (cljs.core.truth_(function() {
      var a = d;
      return cljs.core.truth_(a) ? cljs.core.not_EQ_.call(null, d, c) : a;
    }())) {
      if (cljs.core.truth_(d.webkitMatchesSelector(cljs.core.name.call(null, b)))) {
        return d;
      }
      d = lt.util.dom.parent.call(null, d);
    } else {
      return null;
    }
  }
};
lt.util.dom.next = function(a) {
  return a.nextElementSibling;
};
lt.util.dom.before = function(a, b) {
  return lt.util.dom.parent.call(null, a).insertBefore(b, a);
};
lt.util.dom.after = function(a, b) {
  var c = lt.util.dom.next.call(null, a);
  return cljs.core.truth_(c) ? lt.util.dom.before.call(null, c, b) : lt.util.dom.append.call(null, lt.util.dom.parent.call(null, a), b);
};
lt.util.dom.replace_with = function(a, b) {
  var c = lt.util.dom.parent.call(null, a);
  return cljs.core.truth_(c) ? c.replaceChild(b, a) : null;
};
lt.util.dom.height = function(a) {
  return a.clientHeight;
};
lt.util.dom.width = function(a) {
  return a.clientWidth;
};
lt.util.dom.scroll_width = function(a) {
  return a.scrollWidth;
};
lt.util.dom.offset_top = function(a) {
  return a.offsetTop;
};
lt.util.dom.scroll_top = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null);
    return cljs.core.not.call(null, e) ? a.scrollTop : a.scrollTop = e;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.dom.top = function(a) {
  return lt.util.dom.css.call(null, a, new cljs.core.Keyword(null, "top", "top", 1014019271));
};
lt.util.dom.bottom = function(a) {
  return lt.util.dom.css.call(null, a, new cljs.core.Keyword(null, "bottom", "bottom", 3925642653));
};
lt.util.dom.left = function(a) {
  return lt.util.dom.css.call(null, a, new cljs.core.Keyword(null, "left", "left", 1017222009));
};
lt.util.dom.right = function(a) {
  return lt.util.dom.css.call(null, a, new cljs.core.Keyword(null, "right", "right", 1122416014));
};
lt.util.dom.html = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null);
    return cljs.core.not.call(null, e) ? a.innerHTML : a.innerHTML = e;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.dom.__GT_ev = function(a) {
  return "" + cljs.core.str(cljs.core.name.call(null, a));
};
lt.util.dom.trigger = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    var f = document.createEvent("HTMLEvents");
    f.initEvent(cljs.core.name.call(null, b), !0, !0);
    f.opts = e;
    return a.dispatchEvent(f);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.dom.on = function(a, b, c) {
  return a.addEventListener(lt.util.dom.__GT_ev.call(null, b), c);
};
lt.util.dom.off = function(a, b, c) {
  return a.removeEventListener(lt.util.dom.__GT_ev.call(null, b), c);
};
lt.util.dom.on_STAR_ = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      a.addEventListener(lt.util.dom.__GT_ev.call(null, h), g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, c), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), a.addEventListener(lt.util.dom.__GT_ev.call(null, h), g), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.util.dom.active_element = function() {
  return document.activeElement;
};
lt.util.dom.focus = function(a) {
  return a.focus();
};
lt.util.dom.blur = function(a) {
  return a.blur();
};
lt.util.dom.selection = function(a, b, c, d) {
  return a.setSelectionRange(b, c, d);
};
lt.util.dom.make = function(a) {
  var b = document.createElement("div");
  lt.util.dom.html.call(null, b, a);
  return lt.util.dom.children.call(null, b);
};
lt.util.dom.index = function(a) {
  var b = lt.util.dom.parent.call(null, a), c = cljs.core.truth_(b) ? lt.util.dom.children.call(null, b) : [], d = c.length;
  if (cljs.core.not.call(null, b)) {
    return-1;
  }
  for (b = 0;;) {
    if (b >= d) {
      return null;
    }
    if (cljs.core._EQ_.call(null, c[b], a)) {
      return b;
    }
    b += 1;
  }
};
lt.util.dom.ready = function(a) {
  return lt.util.dom.on.call(null, document, new cljs.core.Keyword(null, "DOMContentLoaded", "DOMContentLoaded", 3783578446), a);
};
lt.util.dom.fragment = function(a) {
  var b = document.createDocumentFragment();
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      b.appendChild(f);
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), b.appendChild(a), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.util.js = {};
lt.util.js.every = function(a, b) {
  return setInterval(b, a);
};
lt.util.js.wait = function(a, b) {
  return setTimeout(b, a);
};
lt.util.js.now = function() {
  return(new Date).getTime();
};
lt.util.js.toggler = function(a, b, c) {
  return cljs.core._EQ_.call(null, a, b) ? c : b;
};
lt.util.js.debounce = function(a, b) {
  return Cowboy.debounce(a, b);
};
lt.util.js.throttle = function(a, b) {
  return Cowboy.throttle(a, b);
};
lt.util.js.__GT_clj = function(a) {
  return cljs.core.js__GT_clj.call(null, a, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
};
lt.util.js.entities = new cljs.core.PersistentArrayMap(null, 6, "\x26 \x26amp; \x3c \x26lt; \x3e \x26gt; \" \x26quot; ' \x26#39; / \x26#x2F;".split(" "), null);
lt.util.js.escape = function(a) {
  return cljs.core.truth_(a) ? a.replace(RegExp("[\x26\x3c\x3e\"'/]", "g"), function(a) {
    return lt.util.js.entities.call(null, a);
  }) : null;
};
var clojure = {string:{}};
clojure.string.seq_reverse = function(a) {
  return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.List.EMPTY, a);
};
clojure.string.reverse = function(a) {
  return a.split("").reverse().join("");
};
clojure.string.replace = function(a, b, c) {
  if ("string" === typeof b) {
    return a.replace(RegExp(goog.string.regExpEscape(b), "g"), c);
  }
  if (cljs.core.truth_(b.hasOwnProperty("source"))) {
    return a.replace(RegExp(b.source, "g"), c);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    throw[cljs.core.str("Invalid match arg: "), cljs.core.str(b)].join("");
  }
  return null;
};
clojure.string.replace_first = function(a, b, c) {
  return a.replace(b, c);
};
clojure.string.join = function() {
  var a = null, b = function(a) {
    return cljs.core.apply.call(null, cljs.core.str, a);
  }, c = function(a, b) {
    return cljs.core.apply.call(null, cljs.core.str, cljs.core.interpose.call(null, a, b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
clojure.string.upper_case = function(a) {
  return a.toUpperCase();
};
clojure.string.lower_case = function(a) {
  return a.toLowerCase();
};
clojure.string.capitalize = function(a) {
  return 2 > cljs.core.count.call(null, a) ? clojure.string.upper_case.call(null, a) : [cljs.core.str(clojure.string.upper_case.call(null, cljs.core.subs.call(null, a, 0, 1))), cljs.core.str(clojure.string.lower_case.call(null, cljs.core.subs.call(null, a, 1)))].join("");
};
clojure.string.pop_last_while_empty = function(a) {
  for (;;) {
    if (cljs.core._EQ_.call(null, "", cljs.core.peek.call(null, a))) {
      a = cljs.core.pop.call(null, a);
    } else {
      return a;
    }
  }
};
clojure.string.discard_trailing_if_needed = function(a, b) {
  return cljs.core._EQ_.call(null, 0, a) ? clojure.string.pop_last_while_empty.call(null, b) : b;
};
clojure.string.split_with_empty_regex = function(a, b) {
  if (0 >= b || b >= 2 + cljs.core.count.call(null, a)) {
    return cljs.core.conj.call(null, cljs.core.vec.call(null, cljs.core.cons.call(null, "", cljs.core.map.call(null, cljs.core.str, cljs.core.seq.call(null, a)))), "");
  }
  var c = cljs.core._EQ_;
  if (cljs.core.truth_(c.call(null, 1, b))) {
    return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null);
  }
  if (cljs.core.truth_(c.call(null, 2, b))) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["", a], null);
  }
  c = b - 2;
  return cljs.core.conj.call(null, cljs.core.vec.call(null, cljs.core.cons.call(null, "", cljs.core.subvec.call(null, cljs.core.vec.call(null, cljs.core.map.call(null, cljs.core.str, cljs.core.seq.call(null, a))), 0, c))), cljs.core.subs.call(null, a, c));
};
clojure.string.split = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, c, 0);
  }, c = function(a, b, c) {
    return clojure.string.discard_trailing_if_needed.call(null, c, cljs.core._EQ_.call(null, "" + cljs.core.str(b), "/(?:)/") ? clojure.string.split_with_empty_regex.call(null, a, c) : 1 > c ? cljs.core.vec.call(null, ("" + cljs.core.str(a)).split(b)) : function() {
      for (var g = a, h = c, k = cljs.core.PersistentVector.EMPTY;;) {
        if (cljs.core._EQ_.call(null, h, 1)) {
          return cljs.core.conj.call(null, k, g);
        }
        var l = cljs.core.re_find.call(null, b, g);
        if (cljs.core.truth_(l)) {
          var m = l, l = g.indexOf(m), m = g.substring(l + cljs.core.count.call(null, m)), h = h - 1, k = cljs.core.conj.call(null, k, g.substring(0, l)), g = m
        } else {
          return cljs.core.conj.call(null, k, g);
        }
      }
    }());
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
clojure.string.split_lines = function(a) {
  return clojure.string.split.call(null, a, /\n|\r\n/);
};
clojure.string.trim = function(a) {
  return goog.string.trim(a);
};
clojure.string.triml = function(a) {
  return goog.string.trimLeft(a);
};
clojure.string.trimr = function(a) {
  return goog.string.trimRight(a);
};
clojure.string.trim_newline = function(a) {
  for (var b = a.length;;) {
    if (0 === b) {
      return "";
    }
    var c = cljs.core.get.call(null, a, b - 1);
    if (cljs.core._EQ_.call(null, c, "\n") || cljs.core._EQ_.call(null, c, "\r")) {
      b -= 1;
    } else {
      return a.substring(0, b);
    }
  }
};
clojure.string.blank_QMARK_ = function(a) {
  return goog.string.isEmptySafe(a);
};
clojure.string.escape = function(a, b) {
  for (var c = new goog.string.StringBuffer, d = a.length, e = 0;;) {
    if (cljs.core._EQ_.call(null, d, e)) {
      return c.toString();
    }
    var f = a.charAt(e), g = cljs.core.get.call(null, b, f);
    cljs.core.truth_(g) ? c.append("" + cljs.core.str(g)) : c.append(f);
    e += 1;
  }
};
lt.util.cljs = {};
cljs.core._STAR_print_fn_STAR_ = function(a) {
  return cljs.core.truth_(cljs.core.truth_(a) ? cljs.core.not_EQ_.call(null, a, "") && cljs.core.not_EQ_.call(null, a, "\n") : a) ? console.log(clojure.string.trim.call(null, a)) : null;
};
cljs.core.ChunkedCons.prototype.cljs$core$INext$ = !0;
cljs.core.ChunkedCons.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return cljs.core._seq.call(null, cljs.core._rest.call(null, this));
};
cljs.core.ISeqable["null"] = !0;
cljs.core._seq["null"] = function(a) {
  return null;
};
cljs.core.RSeq.prototype.cljs$core$INext$ = !0;
cljs.core.RSeq.prototype.cljs$core$INext$_next$arity$1 = function(a) {
  return cljs.core._seq.call(null, cljs.core._rest.call(null, this));
};
global.String.prototype.cljs$core$ISeqable$ = !0;
global.String.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core.truth_(cljs.core.truth_(this) ? 0 !== this.length : this) ? new cljs.core.IndexedSeq(new String(this), 0) : null;
};
global.String.prototype.cljs$core$IFn$ = !0;
global.String.prototype.call = function() {
  var a = null;
  return a = function(a, c, d) {
    switch(arguments.length) {
      case 2:
        return cljs.core.get.call(null, c, this.toString());
      case 3:
        return cljs.core.get.call(null, c, this.toString(), d);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
}();
global.String.prototype.apply = function(a, b) {
  return this.call.apply(this, [this].concat(cljs.core.aclone.call(null, b)));
};
global.String.prototype.cljs$core$IFn$_invoke$arity$1 = function(a) {
  return cljs.core.get.call(null, a, this.toString());
};
global.String.prototype.cljs$core$IFn$_invoke$arity$2 = function(a, b) {
  return cljs.core.get.call(null, a, this.toString(), b);
};
global.String.prototype.apply = function(a, b) {
  return 2 > b.length ? cljs.core.get.call(null, b[0], a) : cljs.core.get.call(null, b[0], a, b[1]);
};
global.Array.prototype.cljs$core$ISeqable$ = !0;
global.Array.prototype.cljs$core$ISeqable$_seq$arity$1 = function(a) {
  return cljs.core.truth_(cljs.core.truth_(this) ? 0 !== this.length : this) ? new cljs.core.IndexedSeq(this, 0) : null;
};
lt.util.cljs.__GT_dottedkw = function() {
  var a = function(a) {
    return cljs.core.keyword.call(null, clojure.string.join.call(null, ".", cljs.core.map.call(null, cljs.core.name, cljs.core.filter.call(null, cljs.core.identity, a))));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.cljs.js__GT_clj = function() {
  var a = function(a) {
    lt.objs.console.error("lt.util.cljs/js-\x3eclj is deprecated and will be removed in 0.9.0. Use js-\x3eclj instead");
    return cljs.core.apply.call(null, cljs.core.js__GT_clj, a);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.cljs.str_contains_QMARK_ = function(a, b) {
  return-1 < a.indexOf(b);
};
lt.util.cljs.index_of = function(a, b) {
  return cljs.core.first.call(null, cljs.core.keep_indexed.call(null, function(b, d) {
    return cljs.core._EQ_.call(null, a, d) ? b : null;
  }, b));
};
clojure.set = {};
clojure.set.bubble_max_key = function(a, b) {
  var c = cljs.core.apply.call(null, cljs.core.max_key, a, b);
  return cljs.core.cons.call(null, c, cljs.core.remove.call(null, function(a) {
    return c === a;
  }, b));
};
clojure.set.union = function() {
  var a = null, b = function() {
    return cljs.core.PersistentHashSet.EMPTY;
  }, c = function(a, b) {
    return cljs.core.count.call(null, a) < cljs.core.count.call(null, b) ? cljs.core.reduce.call(null, cljs.core.conj, b, a) : cljs.core.reduce.call(null, cljs.core.conj, a, b);
  }, d = function() {
    var a = function(a, b, c) {
      a = clojure.set.bubble_max_key.call(null, cljs.core.count, cljs.core.conj.call(null, c, b, a));
      return cljs.core.reduce.call(null, cljs.core.into, cljs.core.first.call(null, a), cljs.core.rest.call(null, a));
    }, b = function(b, c, d) {
      var f = null;
      2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return a.call(this, b, c, f);
    };
    b.cljs$lang$maxFixedArity = 2;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, f, g) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return a;
      case 2:
        return c.call(this, a, f);
      default:
        return d.cljs$core$IFn$_invoke$arity$variadic(a, f, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = d.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$variadic = d.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
clojure.set.intersection = function() {
  var a = null, b = function(a, b) {
    for (;;) {
      if (cljs.core.count.call(null, b) < cljs.core.count.call(null, a)) {
        var c = a;
        a = b;
        b = c;
      } else {
        return cljs.core.reduce.call(null, function(a, b) {
          return function(a, c) {
            return cljs.core.contains_QMARK_.call(null, b, c) ? a : cljs.core.disj.call(null, a, c);
          };
        }(a, b), a, a);
      }
    }
  }, c = function() {
    var b = function(b, c, d) {
      b = clojure.set.bubble_max_key.call(null, function(a) {
        return-cljs.core.count.call(null, a);
      }, cljs.core.conj.call(null, d, c, b));
      return cljs.core.reduce.call(null, a, cljs.core.first.call(null, b), cljs.core.rest.call(null, b));
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
clojure.set.difference = function() {
  var a = null, b = function(a, b) {
    return cljs.core.count.call(null, a) < cljs.core.count.call(null, b) ? cljs.core.reduce.call(null, function(a, c) {
      return cljs.core.contains_QMARK_.call(null, b, c) ? cljs.core.disj.call(null, a, c) : a;
    }, a, a) : cljs.core.reduce.call(null, cljs.core.disj, a, b);
  }, c = function() {
    var b = function(b, c, d) {
      return cljs.core.reduce.call(null, a, b, cljs.core.conj.call(null, d, c));
    }, c = function(a, c, e) {
      var k = null;
      2 < arguments.length && (k = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
      return b.call(this, a, c, k);
    };
    c.cljs$lang$maxFixedArity = 2;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.next(a);
      var e = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, e, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return a;
      case 2:
        return b.call(this, a, e);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, e, cljs.core.array_seq(arguments, 2));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 2;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$1 = function(a) {
    return a;
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
clojure.set.select = function(a, b) {
  return cljs.core.reduce.call(null, function(b, d) {
    return cljs.core.truth_(a.call(null, d)) ? b : cljs.core.disj.call(null, b, d);
  }, b, b);
};
clojure.set.project = function(a, b) {
  return cljs.core.set.call(null, cljs.core.map.call(null, function(a) {
    return cljs.core.select_keys.call(null, a, b);
  }, a));
};
clojure.set.rename_keys = function(a, b) {
  return cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.not_EQ_.call(null, e, f) && cljs.core.contains_QMARK_.call(null, a, e) ? cljs.core.dissoc.call(null, cljs.core.assoc.call(null, a, f, cljs.core.get.call(null, a, e)), e) : a;
  }, a, b);
};
clojure.set.rename = function(a, b) {
  return cljs.core.set.call(null, cljs.core.map.call(null, function(a) {
    return clojure.set.rename_keys.call(null, a, b);
  }, a));
};
clojure.set.index = function(a, b) {
  return cljs.core.reduce.call(null, function(a, d) {
    var e = cljs.core.select_keys.call(null, d, b);
    return cljs.core.assoc.call(null, a, e, cljs.core.conj.call(null, cljs.core.get.call(null, a, e, cljs.core.PersistentHashSet.EMPTY), d));
  }, cljs.core.PersistentArrayMap.EMPTY, a);
};
clojure.set.map_invert = function(a) {
  return cljs.core.reduce.call(null, function(a, c) {
    var d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null);
    return cljs.core.assoc.call(null, a, e, d);
  }, cljs.core.PersistentArrayMap.EMPTY, a);
};
clojure.set.join = function() {
  var a = null, b = function(a, b) {
    if (cljs.core.seq.call(null, a) && cljs.core.seq.call(null, b)) {
      var c = clojure.set.intersection.call(null, cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, a))), cljs.core.set.call(null, cljs.core.keys.call(null, cljs.core.first.call(null, b)))), g = cljs.core.count.call(null, a) <= cljs.core.count.call(null, b) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, a], null), h = cljs.core.nth.call(null, 
      g, 0, null), g = cljs.core.nth.call(null, g, 1, null), k = clojure.set.index.call(null, h, c);
      return cljs.core.reduce.call(null, function(a, b) {
        var d = k.call(null, cljs.core.select_keys.call(null, b, c));
        return cljs.core.truth_(d) ? cljs.core.reduce.call(null, function(a, c) {
          return cljs.core.conj.call(null, a, cljs.core.merge.call(null, c, b));
        }, a, d) : a;
      }, cljs.core.PersistentHashSet.EMPTY, g);
    }
    return cljs.core.PersistentHashSet.EMPTY;
  }, c = function(a, b, c) {
    a = cljs.core.count.call(null, a) <= cljs.core.count.call(null, b) ? new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b, clojure.set.map_invert.call(null, c)], null) : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, a, c], null);
    b = cljs.core.nth.call(null, a, 0, null);
    c = cljs.core.nth.call(null, a, 1, null);
    var g = cljs.core.nth.call(null, a, 2, null), h = clojure.set.index.call(null, b, cljs.core.vals.call(null, g));
    return cljs.core.reduce.call(null, function(a, b) {
      var c = h.call(null, clojure.set.rename_keys.call(null, cljs.core.select_keys.call(null, b, cljs.core.keys.call(null, g)), g));
      return cljs.core.truth_(c) ? cljs.core.reduce.call(null, function(a, c) {
        return cljs.core.conj.call(null, a, cljs.core.merge.call(null, c, b));
      }, a, c) : a;
    }, cljs.core.PersistentHashSet.EMPTY, c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
clojure.set.subset_QMARK_ = function(a, b) {
  return cljs.core.count.call(null, a) <= cljs.core.count.call(null, b) && cljs.core.every_QMARK_.call(null, function(a) {
    return cljs.core.contains_QMARK_.call(null, b, a);
  }, a);
};
clojure.set.superset_QMARK_ = function(a, b) {
  return cljs.core.count.call(null, a) >= cljs.core.count.call(null, b) && cljs.core.every_QMARK_.call(null, function(b) {
    return cljs.core.contains_QMARK_.call(null, a, b);
  }, b);
};
var crate = {binding:{}};
crate.binding.SubAtom = function(a, b, c, d, e) {
  this.atm = a;
  this.path = b;
  this.prevhash = c;
  this.watches = d;
  this.key = e;
  this.cljs$lang$protocol_mask$partition0$ = 2153807872;
  this.cljs$lang$protocol_mask$partition1$ = 2;
};
crate.binding.SubAtom.cljs$lang$type = !0;
crate.binding.SubAtom.cljs$lang$ctorStr = "crate.binding/SubAtom";
crate.binding.SubAtom.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "crate.binding/SubAtom");
};
crate.binding.SubAtom.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return goog.getUid(this);
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
  a = cljs.core.seq.call(null, this.watches);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      g.call(null, h, this, b, c);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, a), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), g.call(null, h, this, b, c), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
  return cljs.core.truth_(c) ? this.watches = cljs.core.assoc.call(null, this.watches, b, c) : null;
};
crate.binding.SubAtom.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
  return this.watches = cljs.core.dissoc.call(null, this.watches, b);
};
crate.binding.SubAtom.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, [cljs.core.str("#\x3cSubAtom: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.get_in.call(null, cljs.core.deref.call(null, this.atm), this.path))), cljs.core.str("\x3e")].join(""));
};
crate.binding.SubAtom.prototype.cljs$core$IDeref$_deref$arity$1 = function(a) {
  return cljs.core.truth_(this.atm) ? cljs.core.get_in.call(null, cljs.core.deref.call(null, this.atm), this.path) : null;
};
crate.binding.SubAtom.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return this === b;
};
crate.binding.__GT_SubAtom = function(a, b, c, d, e) {
  return new crate.binding.SubAtom(a, b, c, d, e);
};
crate.binding.subatom = function(a, b) {
  var c = cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), d = a instanceof crate.binding.SubAtom ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a.atm, cljs.core.concat.call(null, a.path, c)], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, c], null), c = cljs.core.nth.call(null, d, 0, null), e = cljs.core.nth.call(null, d, 1, null), 
  d = cljs.core.gensym.call(null, "subatom"), f = new crate.binding.SubAtom(c, e, cljs.core.hash.call(null, cljs.core.get_in.call(null, cljs.core.deref.call(null, c), e)), null, d);
  cljs.core.add_watch.call(null, c, d, function(a, b, c, d) {
    a = cljs.core.get_in.call(null, d, e);
    b = cljs.core.get_in.call(null, c, e);
    d = cljs.core.hash.call(null, a);
    return cljs.core.not_EQ_.call(null, f.prevhash, d) && cljs.core.not_EQ_.call(null, b, a) ? (f.prevhash = d, cljs.core._notify_watches.call(null, f, cljs.core.get_in.call(null, c, e), a)) : null;
  });
  return f;
};
crate.binding.sub_reset_BANG_ = function(a, b) {
  cljs.core.swap_BANG_.call(null, a.atm, cljs.core.assoc_in, a.path, b);
  return b;
};
crate.binding.sub_swap_BANG_ = function() {
  var a = null, b = function(a, b) {
    return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a)));
  }, c = function(a, b, c) {
    return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c));
  }, d = function(a, b, c, d) {
    return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c, d));
  }, e = function(a, b, c, d, e) {
    return crate.binding.sub_reset_BANG_.call(null, a, b.call(null, cljs.core.deref.call(null, a), c, d, e));
  }, f = function() {
    var a = function(a, b, c, d, e, f) {
      return crate.binding.sub_reset_BANG_.call(null, a, cljs.core.apply.call(null, b, cljs.core.deref.call(null, a), c, d, e, f));
    }, b = function(b, c, d, e, f, h) {
      var r = null;
      5 < arguments.length && (r = cljs.core.array_seq(Array.prototype.slice.call(arguments, 5), 0));
      return a.call(this, b, c, d, e, f, r);
    };
    b.cljs$lang$maxFixedArity = 5;
    b.cljs$lang$applyTo = function(b) {
      var c = cljs.core.first(b);
      b = cljs.core.next(b);
      var d = cljs.core.first(b);
      b = cljs.core.next(b);
      var e = cljs.core.first(b);
      b = cljs.core.next(b);
      var f = cljs.core.first(b);
      b = cljs.core.next(b);
      var h = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(c, d, e, f, h, b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }(), a = function(a, h, k, l, m, n) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, h);
      case 3:
        return c.call(this, a, h, k);
      case 4:
        return d.call(this, a, h, k, l);
      case 5:
        return e.call(this, a, h, k, l, m);
      default:
        return f.cljs$core$IFn$_invoke$arity$variadic(a, h, k, l, m, cljs.core.array_seq(arguments, 5));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 5;
  a.cljs$lang$applyTo = f.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  a.cljs$core$IFn$_invoke$arity$4 = d;
  a.cljs$core$IFn$_invoke$arity$5 = e;
  a.cljs$core$IFn$_invoke$arity$variadic = f.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
crate.binding.sub_destroy_BANG_ = function(a) {
  cljs.core.remove_watch.call(null, a.atm, a.key);
  a.watches = null;
  return a.atm = null;
};
crate.binding.computable = function() {
  return{};
}();
crate.binding._depend = function(a, b) {
  if (a ? a.crate$binding$computable$_depend$arity$2 : a) {
    return a.crate$binding$computable$_depend$arity$2(a, b);
  }
  var c;
  c = crate.binding._depend[goog.typeOf(null == a ? null : a)];
  if (!c && (c = crate.binding._depend._, !c)) {
    throw cljs.core.missing_protocol.call(null, "computable.-depend", a);
  }
  return c.call(null, a, b);
};
crate.binding._compute = function(a) {
  if (a ? a.crate$binding$computable$_compute$arity$1 : a) {
    return a.crate$binding$computable$_compute$arity$1(a);
  }
  var b;
  b = crate.binding._compute[goog.typeOf(null == a ? null : a)];
  if (!b && (b = crate.binding._compute._, !b)) {
    throw cljs.core.missing_protocol.call(null, "computable.-compute", a);
  }
  return b.call(null, a);
};
crate.binding.Computed = function(a, b, c, d, e, f) {
  this.atms = a;
  this.value = b;
  this.func = c;
  this.watches = d;
  this.key = e;
  this.meta = f;
  this.cljs$lang$protocol_mask$partition0$ = 2153938944;
  this.cljs$lang$protocol_mask$partition1$ = 2;
};
crate.binding.Computed.cljs$lang$type = !0;
crate.binding.Computed.cljs$lang$ctorStr = "crate.binding/Computed";
crate.binding.Computed.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "crate.binding/Computed");
};
crate.binding.Computed.prototype.crate$binding$computable$ = !0;
crate.binding.Computed.prototype.crate$binding$computable$_depend$arity$2 = function(a, b) {
  var c = this;
  c.atms = cljs.core.conj.call(null, c.atms, b);
  return cljs.core.add_watch.call(null, b, this.key, function(a, b, f, g) {
    return crate.binding._compute.call(null, c);
  });
};
crate.binding.Computed.prototype.crate$binding$computable$_compute$arity$1 = function(a) {
  a = this.value;
  var b = cljs.core.apply.call(null, this.func, cljs.core.map.call(null, cljs.core.deref, this.atms));
  this.value = b;
  return cljs.core._notify_watches.call(null, this, a, b);
};
crate.binding.Computed.prototype.cljs$core$IMeta$_meta$arity$1 = function(a) {
  return this.meta;
};
crate.binding.Computed.prototype.cljs$core$IHash$_hash$arity$1 = function(a) {
  return goog.getUid(this);
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
  a = cljs.core.seq.call(null, this.watches);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      g.call(null, h, this, b, c);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, a), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), g.call(null, h, this, b, c), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
  return cljs.core.truth_(c) ? this.watches = cljs.core.assoc.call(null, this.watches, b, c) : null;
};
crate.binding.Computed.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
  return this.watches = cljs.core.dissoc.call(null, this.watches, b);
};
crate.binding.Computed.prototype.cljs$core$IPrintWithWriter$_pr_writer$arity$3 = function(a, b, c) {
  return cljs.core._write.call(null, b, [cljs.core.str("#\x3cComputed: "), cljs.core.str(cljs.core.pr_str.call(null, this.value)), cljs.core.str("\x3e")].join(""));
};
crate.binding.Computed.prototype.cljs$core$IDeref$_deref$arity$1 = function(a) {
  return this.value;
};
crate.binding.Computed.prototype.cljs$core$IEquiv$_equiv$arity$2 = function(a, b) {
  return this === b;
};
crate.binding.__GT_Computed = function(a, b, c, d, e, f) {
  return new crate.binding.Computed(a, b, c, d, e, f);
};
crate.binding.computed = function(a, b) {
  var c = cljs.core.gensym.call(null, "computed"), c = new crate.binding.Computed(cljs.core.PersistentVector.EMPTY, null, b, null, c, null);
  crate.binding._compute.call(null, c);
  for (var d = cljs.core.seq.call(null, a), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g);
      crate.binding._depend.call(null, c, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        e = d, cljs.core.chunked_seq_QMARK_.call(null, e) ? (d = cljs.core.chunk_first.call(null, e), g = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = g) : (d = cljs.core.first.call(null, e), crate.binding._depend.call(null, c, d), d = cljs.core.next.call(null, e), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
crate.binding.compute = function(a) {
  return crate.binding._compute.call(null, a);
};
crate.binding.depend_on = function(a, b) {
  return crate.binding._depend.call(null, a, b);
};
crate.binding.notify = function(a, b, c) {
  return cljs.core._notify_watches.call(null, a, b, c);
};
crate.binding.bindable_coll = function() {
  return{};
}();
crate.binding.bindable = function() {
  return{};
}();
crate.binding._value = function(a) {
  if (a ? a.crate$binding$bindable$_value$arity$1 : a) {
    return a.crate$binding$bindable$_value$arity$1(a);
  }
  var b;
  b = crate.binding._value[goog.typeOf(null == a ? null : a)];
  if (!b && (b = crate.binding._value._, !b)) {
    throw cljs.core.missing_protocol.call(null, "bindable.-value", a);
  }
  return b.call(null, a);
};
crate.binding._on_change = function(a, b) {
  if (a ? a.crate$binding$bindable$_on_change$arity$2 : a) {
    return a.crate$binding$bindable$_on_change$arity$2(a, b);
  }
  var c;
  c = crate.binding._on_change[goog.typeOf(null == a ? null : a)];
  if (!c && (c = crate.binding._on_change._, !c)) {
    throw cljs.core.missing_protocol.call(null, "bindable.-on-change", a);
  }
  return c.call(null, a, b);
};
crate.binding.atom_binding = function(a, b) {
  this.atm = a;
  this.value_func = b;
};
crate.binding.atom_binding.cljs$lang$type = !0;
crate.binding.atom_binding.cljs$lang$ctorStr = "crate.binding/atom-binding";
crate.binding.atom_binding.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "crate.binding/atom-binding");
};
crate.binding.atom_binding.prototype.crate$binding$bindable$ = !0;
crate.binding.atom_binding.prototype.crate$binding$bindable$_value$arity$1 = function(a) {
  return this.value_func.call(null, cljs.core.deref.call(null, this.atm));
};
crate.binding.atom_binding.prototype.crate$binding$bindable$_on_change$arity$2 = function(a, b) {
  var c = this;
  return cljs.core.add_watch.call(null, this.atm, cljs.core.gensym.call(null, "atom-binding"), function() {
    return b.call(null, crate.binding._value.call(null, c));
  });
};
crate.binding.__GT_atom_binding = function(a, b) {
  return new crate.binding.atom_binding(a, b);
};
crate.binding.notifier = function(a) {
  this.watches = a;
  this.cljs$lang$protocol_mask$partition0$ = 0;
  this.cljs$lang$protocol_mask$partition1$ = 2;
};
crate.binding.notifier.cljs$lang$type = !0;
crate.binding.notifier.cljs$lang$ctorStr = "crate.binding/notifier";
crate.binding.notifier.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "crate.binding/notifier");
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_notify_watches$arity$3 = function(a, b, c) {
  a = cljs.core.seq.call(null, this.watches);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      g.call(null, h, this, b, c);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, a), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), g.call(null, h, this, b, c), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_add_watch$arity$3 = function(a, b, c) {
  return this.watches = cljs.core.assoc.call(null, this.watches, b, c);
};
crate.binding.notifier.prototype.cljs$core$IWatchable$_remove_watch$arity$2 = function(a, b) {
  return this.watches = cljs.core.dissoc.call(null, this.watches, b);
};
crate.binding.__GT_notifier = function(a) {
  return new crate.binding.notifier(a);
};
crate.binding.bound_collection = function(a, b, c, d) {
  this.atm = a;
  this.notif = b;
  this.opts = c;
  this.stuff = d;
};
crate.binding.bound_collection.cljs$lang$type = !0;
crate.binding.bound_collection.cljs$lang$ctorStr = "crate.binding/bound-collection";
crate.binding.bound_collection.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "crate.binding/bound-collection");
};
crate.binding.bound_collection.prototype.crate$binding$bindable$ = !0;
crate.binding.bound_collection.prototype.crate$binding$bindable$_value$arity$1 = function(a) {
  return cljs.core.map.call(null, new cljs.core.Keyword(null, "elem", "elem", 1017020161), cljs.core.vals.call(null, this.stuff));
};
crate.binding.bound_collection.prototype.crate$binding$bindable$_on_change$arity$2 = function(a, b) {
  return cljs.core.add_watch.call(null, this.notif, cljs.core.gensym.call(null, "bound-coll"), function(a, d, e, f) {
    a = cljs.core.nth.call(null, f, 0, null);
    d = cljs.core.nth.call(null, f, 1, null);
    f = cljs.core.nth.call(null, f, 2, null);
    return b.call(null, a, d, f);
  });
};
crate.binding.bound_collection.prototype.crate$binding$bindable_coll$ = !0;
crate.binding.__GT_bound_collection = function(a, b, c, d) {
  return new crate.binding.bound_collection(a, b, c, d);
};
crate.binding.opt = function(a, b) {
  return a.opts.call(null, b);
};
crate.binding.bc_add = function(a, b, c) {
  b = crate.binding.subatom.call(null, a.atm, b);
  var d = crate.binding.opt.call(null, a, new cljs.core.Keyword(null, "as", "as", 1013907364)).call(null, b);
  a.stuff = cljs.core.assoc.call(null, a.stuff, c, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "elem", "elem", 1017020161), d, new cljs.core.Keyword(null, "subatom", "subatom", 3440732931), b], null));
  return crate.binding.notify.call(null, a.notif, null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "add", "add", 1014000659), d, cljs.core.deref.call(null, b)], null));
};
crate.binding.bc_remove = function(a, b) {
  var c = a.stuff.call(null, b);
  a.stuff = cljs.core.dissoc.call(null, a.stuff, b);
  crate.binding.notify.call(null, a.notif, null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "remove", "remove", 4374260726), (new cljs.core.Keyword(null, "elem", "elem", 1017020161)).cljs$core$IFn$_invoke$arity$1(c), null], null));
  return crate.binding.sub_destroy_BANG_.call(null, (new cljs.core.Keyword(null, "subatom", "subatom", 3440732931)).cljs$core$IFn$_invoke$arity$1(c));
};
crate.binding.__GT_indexed = function(a) {
  return cljs.core.map_QMARK_.call(null, a) ? cljs.core.seq.call(null, a) : cljs.core.set_QMARK_.call(null, a) ? cljs.core.map.call(null, cljs.core.juxt.call(null, cljs.core.identity, cljs.core.identity), a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.map_indexed.call(null, cljs.core.vector, a) : null;
};
crate.binding.__GT_keyed = function(a, b) {
  return cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, cljs.core.map.call(null, b, crate.binding.__GT_indexed.call(null, a)));
};
crate.binding.__GT_path = function() {
  var a = function(a, b) {
    return cljs.core.concat.call(null, function() {
      var b = crate.binding.opt.call(null, a, new cljs.core.Keyword(null, "path", "path", 1017337751));
      return cljs.core.truth_(b) ? b : cljs.core.PersistentVector.EMPTY;
    }(), b);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
crate.binding.bc_compare = function(a, b) {
  for (var c = cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, cljs.core.keys.call(null, a.stuff)), d = crate.binding.__GT_keyed.call(null, b, crate.binding.opt.call(null, a, new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433))), e = cljs.core.into.call(null, cljs.core.sorted_set.call(null), clojure.set.difference.call(null, d, c)), c = cljs.core.into.call(null, cljs.core.sorted_set.call(null), clojure.set.difference.call(null, c, d)), e = cljs.core.seq.call(null, e), d = null, 
  f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, d, g);
      crate.binding.bc_add.call(null, a, h, h);
      g += 1;
    } else {
      if (e = cljs.core.seq.call(null, e)) {
        d = e, cljs.core.chunked_seq_QMARK_.call(null, d) ? (e = cljs.core.chunk_first.call(null, d), g = cljs.core.chunk_rest.call(null, d), d = e, f = cljs.core.count.call(null, e), e = g) : (e = cljs.core.first.call(null, d), crate.binding.bc_add.call(null, a, e, e), e = cljs.core.next.call(null, d), d = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  c = cljs.core.seq.call(null, c);
  e = null;
  for (g = f = 0;;) {
    if (g < f) {
      d = cljs.core._nth.call(null, e, g), crate.binding.bc_remove.call(null, a, d), g += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        e = c, cljs.core.chunked_seq_QMARK_.call(null, e) ? (c = cljs.core.chunk_first.call(null, e), f = cljs.core.chunk_rest.call(null, e), e = c, d = cljs.core.count.call(null, c), c = f, f = d) : (d = cljs.core.first.call(null, e), crate.binding.bc_remove.call(null, a, d), c = cljs.core.next.call(null, e), e = null, f = 0), g = 0;
      } else {
        return null;
      }
    }
  }
};
crate.binding.bound_coll = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null), e = cljs.core.truth_(f) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, f], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, e], null), f = cljs.core.nth.call(null, e, 0, null), g = cljs.core.nth.call(null, e, 1, null), e = cljs.core.not.call(null, f) ? a : crate.binding.subatom.call(null, a, f), f = cljs.core.assoc.call(null, 
    g, new cljs.core.Keyword(null, "path", "path", 1017337751), f), f = cljs.core.not.call(null, (new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433)).cljs$core$IFn$_invoke$arity$1(f)) ? cljs.core.assoc.call(null, f, new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433), cljs.core.first) : cljs.core.assoc.call(null, f, new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433), cljs.core.comp.call(null, (new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433)).cljs$core$IFn$_invoke$arity$1(f), 
    cljs.core.second)), h = new crate.binding.bound_collection(e, new crate.binding.notifier(null), f, cljs.core.sorted_map.call(null));
    cljs.core.add_watch.call(null, e, cljs.core.gensym.call(null, "bound-coll"), function(a, b, c, d) {
      return crate.binding.bc_compare.call(null, h, d);
    });
    crate.binding.bc_compare.call(null, h, cljs.core.deref.call(null, e));
    return h;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
crate.binding.map_bound = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    a = cljs.core.assoc.call(null, e, new cljs.core.Keyword(null, "as", "as", 1013907364), a);
    b = cljs.core.not.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(a)) ? b : crate.binding.subatom.call(null, b, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(a));
    a = cljs.core.not.call(null, (new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433)).cljs$core$IFn$_invoke$arity$1(a)) ? cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433), cljs.core.first) : cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433), cljs.core.comp.call(null, (new cljs.core.Keyword(null, "keyfn", "keyfn", 1115849433)).cljs$core$IFn$_invoke$arity$1(a), cljs.core.second));
    var f = new crate.binding.bound_collection(b, new crate.binding.notifier(null), a, cljs.core.sorted_map.call(null));
    cljs.core.add_watch.call(null, b, cljs.core.gensym.call(null, "bound-coll"), function(a, b, c, d) {
      return crate.binding.bc_compare.call(null, f, d);
    });
    crate.binding.bc_compare.call(null, f, cljs.core.deref.call(null, b));
    return f;
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
crate.binding.binding_QMARK_ = function(a) {
  return a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.crate$binding$bindable$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, crate.binding.bindable, a) : cljs.core.native_satisfies_QMARK_.call(null, crate.binding.bindable, a);
};
crate.binding.binding_coll_QMARK_ = function(a) {
  return a ? cljs.core.truth_(cljs.core.truth_(null) ? null : a.crate$binding$bindable_coll$) ? !0 : a.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, crate.binding.bindable_coll, a) : cljs.core.native_satisfies_QMARK_.call(null, crate.binding.bindable_coll, a);
};
crate.binding.deref_QMARK_ = function(a) {
  return a ? a.cljs$lang$protocol_mask$partition0$ & 32768 || a.cljs$core$IDeref$ ? !0 : a.cljs$lang$protocol_mask$partition0$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a);
};
crate.binding.value = function(a) {
  return crate.binding._value.call(null, a);
};
crate.binding.index = function(a) {
  return cljs.core.last.call(null, a.path);
};
crate.binding.on_change = function(a, b) {
  return crate.binding._on_change.call(null, a, b);
};
crate.binding.bound = function() {
  var a = function(a, b) {
    var e;
    e = cljs.core.nth.call(null, b, 0, null);
    e = cljs.core.truth_(e) ? e : cljs.core.identity;
    return new crate.binding.atom_binding(a, e);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
crate.util = {};
crate.util._STAR_base_url_STAR_ = null;
crate.util.as_str = function() {
  var a = null, b = function(a) {
    return a instanceof cljs.core.Symbol || a instanceof cljs.core.Keyword ? cljs.core.name.call(null, a) : "" + cljs.core.str(a);
  }, c = function() {
    var b = function(b, c) {
      return function(b, c) {
        for (;;) {
          if (cljs.core.truth_(c)) {
            var d = [cljs.core.str(b), cljs.core.str(a.call(null, cljs.core.first.call(null, c)))].join(""), e = cljs.core.next.call(null, c);
            b = d;
            c = e;
          } else {
            return b;
          }
        }
      }.call(null, a.call(null, b), c);
    }, c = function(a, c) {
      var e = null;
      1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return b.call(this, a, e);
    };
    c.cljs$lang$maxFixedArity = 1;
    c.cljs$lang$applyTo = function(a) {
      var c = cljs.core.first(a);
      a = cljs.core.rest(a);
      return b(c, a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }(), a = function(a, e) {
    switch(arguments.length) {
      case 0:
        return "";
      case 1:
        return b.call(this, a);
      default:
        return c.cljs$core$IFn$_invoke$arity$variadic(a, cljs.core.array_seq(arguments, 1));
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$lang$maxFixedArity = 1;
  a.cljs$lang$applyTo = c.cljs$lang$applyTo;
  a.cljs$core$IFn$_invoke$arity$0 = function() {
    return "";
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$variadic = c.cljs$core$IFn$_invoke$arity$variadic;
  return a;
}();
crate.util.escape_html = function(a) {
  return clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, crate.util.as_str.call(null, a), "\x26", "\x26amp;"), "\x3c", "\x26lt;"), "\x3e", "\x26gt;"), '"', "\x26quot;");
};
crate.util.to_uri = function(a) {
  return cljs.core.truth_(cljs.core.re_matches.call(null, /^\w+:.*/, a)) ? a : [cljs.core.str(crate.util._STAR_base_url_STAR_), cljs.core.str(a)].join("");
};
crate.util.url_encode_component = function(a) {
  return encodeURIComponent(crate.util.as_str.call(null, a));
};
crate.util.url_encode = function(a) {
  return clojure.string.join.call(null, "\x26", function() {
    return function c(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, a);
          if (e) {
            if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
              var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
              a: {
                for (var k = 0;;) {
                  if (k < g) {
                    var l = cljs.core._nth.call(null, f, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null);
                    cljs.core.chunk_append.call(null, h, [cljs.core.str(crate.util.url_encode_component.call(null, m)), cljs.core.str("\x3d"), cljs.core.str(crate.util.url_encode_component.call(null, l))].join(""));
                    k += 1;
                  } else {
                    f = !0;
                    break a;
                  }
                }
                f = void 0;
              }
              return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
            }
            f = cljs.core.first.call(null, e);
            h = cljs.core.nth.call(null, f, 0, null);
            f = cljs.core.nth.call(null, f, 1, null);
            return cljs.core.cons.call(null, [cljs.core.str(crate.util.url_encode_component.call(null, h)), cljs.core.str("\x3d"), cljs.core.str(crate.util.url_encode_component.call(null, f))].join(""), c.call(null, cljs.core.rest.call(null, e)));
          }
          return null;
        }
      }, null, null);
    }.call(null, a);
  }());
};
crate.util.url = function() {
  var a = function(a) {
    var b = cljs.core.last.call(null, a);
    a = cljs.core.butlast.call(null, a);
    return "" + cljs.core.str(crate.util.to_uri.call(null, [cljs.core.str(cljs.core.apply.call(null, cljs.core.str, a)), cljs.core.str(cljs.core.map_QMARK_.call(null, b) ? [cljs.core.str("?"), cljs.core.str(crate.util.url_encode.call(null, b))].join("") : b)].join("")));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
goog.dom = {};
goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentMode(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentMode(9) || goog.userAgent.GECKO && goog.userAgent.isVersion("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersion("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT, INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE};
goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN", 
DIALOG:"DIALOG", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", EMBED:"EMBED", FIELDSET:"FIELDSET", FIGCAPTION:"FIGCAPTION", FIGURE:"FIGURE", FONT:"FONT", FOOTER:"FOOTER", FORM:"FORM", FRAME:"FRAME", FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HEADER:"HEADER", HGROUP:"HGROUP", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", KEYGEN:"KEYGEN", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK", 
MAP:"MAP", MARK:"MARK", MATH:"MATH", MENU:"MENU", META:"META", METER:"METER", NAV:"NAV", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", OUTPUT:"OUTPUT", P:"P", PARAM:"PARAM", PRE:"PRE", PROGRESS:"PROGRESS", Q:"Q", RP:"RP", RT:"RT", RUBY:"RUBY", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SECTION:"SECTION", SELECT:"SELECT", SMALL:"SMALL", SOURCE:"SOURCE", SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUMMARY:"SUMMARY", 
SUP:"SUP", SVG:"SVG", TABLE:"TABLE", TBODY:"TBODY", TD:"TD", TEXTAREA:"TEXTAREA", TFOOT:"TFOOT", TH:"TH", THEAD:"THEAD", TIME:"TIME", TITLE:"TITLE", TR:"TR", TRACK:"TRACK", TT:"TT", U:"U", UL:"UL", VAR:"VAR", VIDEO:"VIDEO", WBR:"WBR"};
goog.dom.classes = {};
goog.dom.classes.set = function(a, b) {
  a.className = b;
};
goog.dom.classes.get = function(a) {
  a = a.className;
  return goog.isString(a) && a.match(/\S+/g) || [];
};
goog.dom.classes.add = function(a, b) {
  var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = c.length + d.length;
  goog.dom.classes.add_(c, d);
  goog.dom.classes.set(a, c.join(" "));
  return c.length == e;
};
goog.dom.classes.remove = function(a, b) {
  var c = goog.dom.classes.get(a), d = goog.array.slice(arguments, 1), e = goog.dom.classes.getDifference_(c, d);
  goog.dom.classes.set(a, e.join(" "));
  return e.length == c.length - d.length;
};
goog.dom.classes.add_ = function(a, b) {
  for (var c = 0;c < b.length;c++) {
    goog.array.contains(a, b[c]) || a.push(b[c]);
  }
};
goog.dom.classes.getDifference_ = function(a, b) {
  return goog.array.filter(a, function(a) {
    return!goog.array.contains(b, a);
  });
};
goog.dom.classes.swap = function(a, b, c) {
  for (var d = goog.dom.classes.get(a), e = !1, f = 0;f < d.length;f++) {
    d[f] == b && (goog.array.splice(d, f--, 1), e = !0);
  }
  e && (d.push(c), goog.dom.classes.set(a, d.join(" ")));
  return e;
};
goog.dom.classes.addRemove = function(a, b, c) {
  var d = goog.dom.classes.get(a);
  goog.isString(b) ? goog.array.remove(d, b) : goog.isArray(b) && (d = goog.dom.classes.getDifference_(d, b));
  goog.isString(c) && !goog.array.contains(d, c) ? d.push(c) : goog.isArray(c) && goog.dom.classes.add_(d, c);
  goog.dom.classes.set(a, d.join(" "));
};
goog.dom.classes.has = function(a, b) {
  return goog.array.contains(goog.dom.classes.get(a), b);
};
goog.dom.classes.enable = function(a, b, c) {
  c ? goog.dom.classes.add(a, b) : goog.dom.classes.remove(a, b);
};
goog.dom.classes.toggle = function(a, b) {
  var c = !goog.dom.classes.has(a, b);
  goog.dom.classes.enable(a, b, c);
  return c;
};
goog.math = {};
goog.math.randomInt = function(a) {
  return Math.floor(Math.random() * a);
};
goog.math.uniformRandom = function(a, b) {
  return a + Math.random() * (b - a);
};
goog.math.clamp = function(a, b, c) {
  return Math.min(Math.max(a, b), c);
};
goog.math.modulo = function(a, b) {
  var c = a % b;
  return 0 > c * b ? c + b : c;
};
goog.math.lerp = function(a, b, c) {
  return a + c * (b - a);
};
goog.math.nearlyEquals = function(a, b, c) {
  return Math.abs(a - b) <= (c || 1E-6);
};
goog.math.standardAngle = function(a) {
  return goog.math.modulo(a, 360);
};
goog.math.toRadians = function(a) {
  return a * Math.PI / 180;
};
goog.math.toDegrees = function(a) {
  return 180 * a / Math.PI;
};
goog.math.angleDx = function(a, b) {
  return b * Math.cos(goog.math.toRadians(a));
};
goog.math.angleDy = function(a, b) {
  return b * Math.sin(goog.math.toRadians(a));
};
goog.math.angle = function(a, b, c, d) {
  return goog.math.standardAngle(goog.math.toDegrees(Math.atan2(d - b, c - a)));
};
goog.math.angleDifference = function(a, b) {
  var c = goog.math.standardAngle(b) - goog.math.standardAngle(a);
  180 < c ? c -= 360 : -180 >= c && (c = 360 + c);
  return c;
};
goog.math.sign = function(a) {
  return 0 == a ? 0 : 0 > a ? -1 : 1;
};
goog.math.longestCommonSubsequence = function(a, b, c, d) {
  c = c || function(a, b) {
    return a == b;
  };
  d = d || function(b, c) {
    return a[b];
  };
  for (var e = a.length, f = b.length, g = [], h = 0;h < e + 1;h++) {
    g[h] = [], g[h][0] = 0;
  }
  for (var k = 0;k < f + 1;k++) {
    g[0][k] = 0;
  }
  for (h = 1;h <= e;h++) {
    for (k = 1;k <= e;k++) {
      c(a[h - 1], b[k - 1]) ? g[h][k] = g[h - 1][k - 1] + 1 : g[h][k] = Math.max(g[h - 1][k], g[h][k - 1]);
    }
  }
  for (var l = [], h = e, k = f;0 < h && 0 < k;) {
    c(a[h - 1], b[k - 1]) ? (l.unshift(d(h - 1, k - 1)), h--, k--) : g[h - 1][k] > g[h][k - 1] ? h-- : k--;
  }
  return l;
};
goog.math.sum = function(a) {
  return goog.array.reduce(arguments, function(a, c) {
    return a + c;
  }, 0);
};
goog.math.average = function(a) {
  return goog.math.sum.apply(null, arguments) / arguments.length;
};
goog.math.standardDeviation = function(a) {
  var b = arguments.length;
  if (2 > b) {
    return 0;
  }
  var c = goog.math.average.apply(null, arguments), b = goog.math.sum.apply(null, goog.array.map(arguments, function(a) {
    return Math.pow(a - c, 2);
  })) / (b - 1);
  return Math.sqrt(b);
};
goog.math.isInt = function(a) {
  return isFinite(a) && 0 == a % 1;
};
goog.math.isFiniteNumber = function(a) {
  return isFinite(a) && !isNaN(a);
};
goog.math.safeFloor = function(a, b) {
  goog.asserts.assert(!goog.isDef(b) || 0 < b);
  return Math.floor(a + (b || 2E-15));
};
goog.math.safeCeil = function(a, b) {
  goog.asserts.assert(!goog.isDef(b) || 0 < b);
  return Math.ceil(a - (b || 2E-15));
};
goog.math.Coordinate = function(a, b) {
  this.x = goog.isDef(a) ? a : 0;
  this.y = goog.isDef(b) ? b : 0;
};
goog.math.Coordinate.prototype.clone = function() {
  return new goog.math.Coordinate(this.x, this.y);
};
goog.DEBUG && (goog.math.Coordinate.prototype.toString = function() {
  return "(" + this.x + ", " + this.y + ")";
});
goog.math.Coordinate.equals = function(a, b) {
  return a == b ? !0 : a && b ? a.x == b.x && a.y == b.y : !1;
};
goog.math.Coordinate.distance = function(a, b) {
  var c = a.x - b.x, d = a.y - b.y;
  return Math.sqrt(c * c + d * d);
};
goog.math.Coordinate.magnitude = function(a) {
  return Math.sqrt(a.x * a.x + a.y * a.y);
};
goog.math.Coordinate.azimuth = function(a) {
  return goog.math.angle(0, 0, a.x, a.y);
};
goog.math.Coordinate.squaredDistance = function(a, b) {
  var c = a.x - b.x, d = a.y - b.y;
  return c * c + d * d;
};
goog.math.Coordinate.difference = function(a, b) {
  return new goog.math.Coordinate(a.x - b.x, a.y - b.y);
};
goog.math.Coordinate.sum = function(a, b) {
  return new goog.math.Coordinate(a.x + b.x, a.y + b.y);
};
goog.math.Coordinate.prototype.ceil = function() {
  this.x = Math.ceil(this.x);
  this.y = Math.ceil(this.y);
  return this;
};
goog.math.Coordinate.prototype.floor = function() {
  this.x = Math.floor(this.x);
  this.y = Math.floor(this.y);
  return this;
};
goog.math.Coordinate.prototype.round = function() {
  this.x = Math.round(this.x);
  this.y = Math.round(this.y);
  return this;
};
goog.math.Coordinate.prototype.translate = function(a, b) {
  a instanceof goog.math.Coordinate ? (this.x += a.x, this.y += a.y) : (this.x += a, goog.isNumber(b) && (this.y += b));
  return this;
};
goog.math.Coordinate.prototype.scale = function(a, b) {
  var c = goog.isNumber(b) ? b : a;
  this.x *= a;
  this.y *= c;
  return this;
};
goog.math.Size = function(a, b) {
  this.width = a;
  this.height = b;
};
goog.math.Size.equals = function(a, b) {
  return a == b ? !0 : a && b ? a.width == b.width && a.height == b.height : !1;
};
goog.math.Size.prototype.clone = function() {
  return new goog.math.Size(this.width, this.height);
};
goog.DEBUG && (goog.math.Size.prototype.toString = function() {
  return "(" + this.width + " x " + this.height + ")";
});
goog.math.Size.prototype.getLongest = function() {
  return Math.max(this.width, this.height);
};
goog.math.Size.prototype.getShortest = function() {
  return Math.min(this.width, this.height);
};
goog.math.Size.prototype.area = function() {
  return this.width * this.height;
};
goog.math.Size.prototype.perimeter = function() {
  return 2 * (this.width + this.height);
};
goog.math.Size.prototype.aspectRatio = function() {
  return this.width / this.height;
};
goog.math.Size.prototype.isEmpty = function() {
  return!this.area();
};
goog.math.Size.prototype.ceil = function() {
  this.width = Math.ceil(this.width);
  this.height = Math.ceil(this.height);
  return this;
};
goog.math.Size.prototype.fitsInside = function(a) {
  return this.width <= a.width && this.height <= a.height;
};
goog.math.Size.prototype.floor = function() {
  this.width = Math.floor(this.width);
  this.height = Math.floor(this.height);
  return this;
};
goog.math.Size.prototype.round = function() {
  this.width = Math.round(this.width);
  this.height = Math.round(this.height);
  return this;
};
goog.math.Size.prototype.scale = function(a, b) {
  var c = goog.isNumber(b) ? b : a;
  this.width *= a;
  this.height *= c;
  return this;
};
goog.math.Size.prototype.scaleToFit = function(a) {
  a = this.aspectRatio() > a.aspectRatio() ? a.width / this.width : a.height / this.height;
  return this.scale(a);
};
goog.dom.ASSUME_QUIRKS_MODE = !1;
goog.dom.ASSUME_STANDARDS_MODE = !1;
goog.dom.COMPAT_MODE_KNOWN_ = goog.dom.ASSUME_QUIRKS_MODE || goog.dom.ASSUME_STANDARDS_MODE;
goog.dom.NodeType = {ELEMENT:1, ATTRIBUTE:2, TEXT:3, CDATA_SECTION:4, ENTITY_REFERENCE:5, ENTITY:6, PROCESSING_INSTRUCTION:7, COMMENT:8, DOCUMENT:9, DOCUMENT_TYPE:10, DOCUMENT_FRAGMENT:11, NOTATION:12};
goog.dom.getDomHelper = function(a) {
  return a ? new goog.dom.DomHelper(goog.dom.getOwnerDocument(a)) : goog.dom.defaultDomHelper_ || (goog.dom.defaultDomHelper_ = new goog.dom.DomHelper);
};
goog.dom.getDocument = function() {
  return document;
};
goog.dom.getElement = function(a) {
  return goog.isString(a) ? document.getElementById(a) : a;
};
goog.dom.$ = goog.dom.getElement;
goog.dom.getElementsByTagNameAndClass = function(a, b, c) {
  return goog.dom.getElementsByTagNameAndClass_(document, a, b, c);
};
goog.dom.getElementsByClass = function(a, b) {
  var c = b || document;
  return goog.dom.canUseQuerySelector_(c) ? c.querySelectorAll("." + a) : c.getElementsByClassName ? c.getElementsByClassName(a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b);
};
goog.dom.getElementByClass = function(a, b) {
  var c = b || document, d = null;
  return(d = goog.dom.canUseQuerySelector_(c) ? c.querySelector("." + a) : goog.dom.getElementsByClass(a, b)[0]) || null;
};
goog.dom.canUseQuerySelector_ = function(a) {
  return!(!a.querySelectorAll || !a.querySelector);
};
goog.dom.getElementsByTagNameAndClass_ = function(a, b, c, d) {
  a = d || a;
  b = b && "*" != b ? b.toUpperCase() : "";
  if (goog.dom.canUseQuerySelector_(a) && (b || c)) {
    return a.querySelectorAll(b + (c ? "." + c : ""));
  }
  if (c && a.getElementsByClassName) {
    a = a.getElementsByClassName(c);
    if (b) {
      d = {};
      for (var e = 0, f = 0, g;g = a[f];f++) {
        b == g.nodeName && (d[e++] = g);
      }
      d.length = e;
      return d;
    }
    return a;
  }
  a = a.getElementsByTagName(b || "*");
  if (c) {
    d = {};
    for (f = e = 0;g = a[f];f++) {
      b = g.className, "function" == typeof b.split && goog.array.contains(b.split(/\s+/), c) && (d[e++] = g);
    }
    d.length = e;
    return d;
  }
  return a;
};
goog.dom.$$ = goog.dom.getElementsByTagNameAndClass;
goog.dom.setProperties = function(a, b) {
  goog.object.forEach(b, function(b, d) {
    "style" == d ? a.style.cssText = b : "class" == d ? a.className = b : "for" == d ? a.htmlFor = b : d in goog.dom.DIRECT_ATTRIBUTE_MAP_ ? a.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[d], b) : goog.string.startsWith(d, "aria-") || goog.string.startsWith(d, "data-") ? a.setAttribute(d, b) : a[d] = b;
  });
};
goog.dom.DIRECT_ATTRIBUTE_MAP_ = {cellpadding:"cellPadding", cellspacing:"cellSpacing", colspan:"colSpan", frameborder:"frameBorder", height:"height", maxlength:"maxLength", role:"role", rowspan:"rowSpan", type:"type", usemap:"useMap", valign:"vAlign", width:"width"};
goog.dom.getViewportSize = function(a) {
  return goog.dom.getViewportSize_(a || window);
};
goog.dom.getViewportSize_ = function(a) {
  a = a.document;
  a = goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body;
  return new goog.math.Size(a.clientWidth, a.clientHeight);
};
goog.dom.getDocumentHeight = function() {
  return goog.dom.getDocumentHeight_(window);
};
goog.dom.getDocumentHeight_ = function(a) {
  var b = a.document, c = 0;
  if (b) {
    a = goog.dom.getViewportSize_(a).height;
    var c = b.body, d = b.documentElement;
    if (goog.dom.isCss1CompatMode_(b) && d.scrollHeight) {
      c = d.scrollHeight != a ? d.scrollHeight : d.offsetHeight;
    } else {
      var b = d.scrollHeight, e = d.offsetHeight;
      d.clientHeight != e && (b = c.scrollHeight, e = c.offsetHeight);
      c = b > a ? b > e ? b : e : b < e ? b : e;
    }
  }
  return c;
};
goog.dom.getPageScroll = function(a) {
  return goog.dom.getDomHelper((a || goog.global || window).document).getDocumentScroll();
};
goog.dom.getDocumentScroll = function() {
  return goog.dom.getDocumentScroll_(document);
};
goog.dom.getDocumentScroll_ = function(a) {
  var b = goog.dom.getDocumentScrollElement_(a);
  a = goog.dom.getWindow_(a);
  return new goog.math.Coordinate(a.pageXOffset || b.scrollLeft, a.pageYOffset || b.scrollTop);
};
goog.dom.getDocumentScrollElement = function() {
  return goog.dom.getDocumentScrollElement_(document);
};
goog.dom.getDocumentScrollElement_ = function(a) {
  return!goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body;
};
goog.dom.getWindow = function(a) {
  return a ? goog.dom.getWindow_(a) : window;
};
goog.dom.getWindow_ = function(a) {
  return a.parentWindow || a.defaultView;
};
goog.dom.createDom = function(a, b, c) {
  return goog.dom.createDom_(document, arguments);
};
goog.dom.createDom_ = function(a, b) {
  var c = b[0], d = b[1];
  if (!goog.dom.BrowserFeature.CAN_ADD_NAME_OR_TYPE_ATTRIBUTES && d && (d.name || d.type)) {
    c = ["\x3c", c];
    d.name && c.push(' name\x3d"', goog.string.htmlEscape(d.name), '"');
    if (d.type) {
      c.push(' type\x3d"', goog.string.htmlEscape(d.type), '"');
      var e = {};
      goog.object.extend(e, d);
      delete e.type;
      d = e;
    }
    c.push("\x3e");
    c = c.join("");
  }
  c = a.createElement(c);
  d && (goog.isString(d) ? c.className = d : goog.isArray(d) ? goog.dom.classes.add.apply(null, [c].concat(d)) : goog.dom.setProperties(c, d));
  2 < b.length && goog.dom.append_(a, c, b, 2);
  return c;
};
goog.dom.append_ = function(a, b, c, d) {
  function e(c) {
    c && b.appendChild(goog.isString(c) ? a.createTextNode(c) : c);
  }
  for (;d < c.length;d++) {
    var f = c[d];
    goog.isArrayLike(f) && !goog.dom.isNodeLike(f) ? goog.array.forEach(goog.dom.isNodeList(f) ? goog.array.toArray(f) : f, e) : e(f);
  }
};
goog.dom.$dom = goog.dom.createDom;
goog.dom.createElement = function(a) {
  return document.createElement(a);
};
goog.dom.createTextNode = function(a) {
  return document.createTextNode(String(a));
};
goog.dom.createTable = function(a, b, c) {
  return goog.dom.createTable_(document, a, b, !!c);
};
goog.dom.createTable_ = function(a, b, c, d) {
  for (var e = ["\x3ctr\x3e"], f = 0;f < c;f++) {
    e.push(d ? "\x3ctd\x3e\x26nbsp;\x3c/td\x3e" : "\x3ctd\x3e\x3c/td\x3e");
  }
  e.push("\x3c/tr\x3e");
  e = e.join("");
  c = ["\x3ctable\x3e"];
  for (f = 0;f < b;f++) {
    c.push(e);
  }
  c.push("\x3c/table\x3e");
  a = a.createElement(goog.dom.TagName.DIV);
  a.innerHTML = c.join("");
  return a.removeChild(a.firstChild);
};
goog.dom.htmlToDocumentFragment = function(a) {
  return goog.dom.htmlToDocumentFragment_(document, a);
};
goog.dom.htmlToDocumentFragment_ = function(a, b) {
  var c = a.createElement("div");
  goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (c.innerHTML = "\x3cbr\x3e" + b, c.removeChild(c.firstChild)) : c.innerHTML = b;
  if (1 == c.childNodes.length) {
    return c.removeChild(c.firstChild);
  }
  for (var d = a.createDocumentFragment();c.firstChild;) {
    d.appendChild(c.firstChild);
  }
  return d;
};
goog.dom.getCompatMode = function() {
  return goog.dom.isCss1CompatMode() ? "CSS1Compat" : "BackCompat";
};
goog.dom.isCss1CompatMode = function() {
  return goog.dom.isCss1CompatMode_(document);
};
goog.dom.isCss1CompatMode_ = function(a) {
  return goog.dom.COMPAT_MODE_KNOWN_ ? goog.dom.ASSUME_STANDARDS_MODE : "CSS1Compat" == a.compatMode;
};
goog.dom.canHaveChildren = function(a) {
  if (a.nodeType != goog.dom.NodeType.ELEMENT) {
    return!1;
  }
  switch(a.tagName) {
    case goog.dom.TagName.APPLET:
    ;
    case goog.dom.TagName.AREA:
    ;
    case goog.dom.TagName.BASE:
    ;
    case goog.dom.TagName.BR:
    ;
    case goog.dom.TagName.COL:
    ;
    case goog.dom.TagName.COMMAND:
    ;
    case goog.dom.TagName.EMBED:
    ;
    case goog.dom.TagName.FRAME:
    ;
    case goog.dom.TagName.HR:
    ;
    case goog.dom.TagName.IMG:
    ;
    case goog.dom.TagName.INPUT:
    ;
    case goog.dom.TagName.IFRAME:
    ;
    case goog.dom.TagName.ISINDEX:
    ;
    case goog.dom.TagName.KEYGEN:
    ;
    case goog.dom.TagName.LINK:
    ;
    case goog.dom.TagName.NOFRAMES:
    ;
    case goog.dom.TagName.NOSCRIPT:
    ;
    case goog.dom.TagName.META:
    ;
    case goog.dom.TagName.OBJECT:
    ;
    case goog.dom.TagName.PARAM:
    ;
    case goog.dom.TagName.SCRIPT:
    ;
    case goog.dom.TagName.SOURCE:
    ;
    case goog.dom.TagName.STYLE:
    ;
    case goog.dom.TagName.TRACK:
    ;
    case goog.dom.TagName.WBR:
      return!1;
  }
  return!0;
};
goog.dom.appendChild = function(a, b) {
  a.appendChild(b);
};
goog.dom.append = function(a, b) {
  goog.dom.append_(goog.dom.getOwnerDocument(a), a, arguments, 1);
};
goog.dom.removeChildren = function(a) {
  for (var b;b = a.firstChild;) {
    a.removeChild(b);
  }
};
goog.dom.insertSiblingBefore = function(a, b) {
  b.parentNode && b.parentNode.insertBefore(a, b);
};
goog.dom.insertSiblingAfter = function(a, b) {
  b.parentNode && b.parentNode.insertBefore(a, b.nextSibling);
};
goog.dom.insertChildAt = function(a, b, c) {
  a.insertBefore(b, a.childNodes[c] || null);
};
goog.dom.removeNode = function(a) {
  return a && a.parentNode ? a.parentNode.removeChild(a) : null;
};
goog.dom.replaceNode = function(a, b) {
  var c = b.parentNode;
  c && c.replaceChild(a, b);
};
goog.dom.flattenElement = function(a) {
  var b, c = a.parentNode;
  if (c && c.nodeType != goog.dom.NodeType.DOCUMENT_FRAGMENT) {
    if (a.removeNode) {
      return a.removeNode(!1);
    }
    for (;b = a.firstChild;) {
      c.insertBefore(b, a);
    }
    return goog.dom.removeNode(a);
  }
};
goog.dom.getChildren = function(a) {
  return goog.dom.BrowserFeature.CAN_USE_CHILDREN_ATTRIBUTE && void 0 != a.children ? a.children : goog.array.filter(a.childNodes, function(a) {
    return a.nodeType == goog.dom.NodeType.ELEMENT;
  });
};
goog.dom.getFirstElementChild = function(a) {
  return void 0 != a.firstElementChild ? a.firstElementChild : goog.dom.getNextElementNode_(a.firstChild, !0);
};
goog.dom.getLastElementChild = function(a) {
  return void 0 != a.lastElementChild ? a.lastElementChild : goog.dom.getNextElementNode_(a.lastChild, !1);
};
goog.dom.getNextElementSibling = function(a) {
  return void 0 != a.nextElementSibling ? a.nextElementSibling : goog.dom.getNextElementNode_(a.nextSibling, !0);
};
goog.dom.getPreviousElementSibling = function(a) {
  return void 0 != a.previousElementSibling ? a.previousElementSibling : goog.dom.getNextElementNode_(a.previousSibling, !1);
};
goog.dom.getNextElementNode_ = function(a, b) {
  for (;a && a.nodeType != goog.dom.NodeType.ELEMENT;) {
    a = b ? a.nextSibling : a.previousSibling;
  }
  return a;
};
goog.dom.getNextNode = function(a) {
  if (!a) {
    return null;
  }
  if (a.firstChild) {
    return a.firstChild;
  }
  for (;a && !a.nextSibling;) {
    a = a.parentNode;
  }
  return a ? a.nextSibling : null;
};
goog.dom.getPreviousNode = function(a) {
  if (!a) {
    return null;
  }
  if (!a.previousSibling) {
    return a.parentNode;
  }
  for (a = a.previousSibling;a && a.lastChild;) {
    a = a.lastChild;
  }
  return a;
};
goog.dom.isNodeLike = function(a) {
  return goog.isObject(a) && 0 < a.nodeType;
};
goog.dom.isElement = function(a) {
  return goog.isObject(a) && a.nodeType == goog.dom.NodeType.ELEMENT;
};
goog.dom.isWindow = function(a) {
  return goog.isObject(a) && a.window == a;
};
goog.dom.getParentElement = function(a) {
  if (goog.dom.BrowserFeature.CAN_USE_PARENT_ELEMENT_PROPERTY) {
    return a.parentElement;
  }
  a = a.parentNode;
  return goog.dom.isElement(a) ? a : null;
};
goog.dom.contains = function(a, b) {
  if (a.contains && b.nodeType == goog.dom.NodeType.ELEMENT) {
    return a == b || a.contains(b);
  }
  if ("undefined" != typeof a.compareDocumentPosition) {
    return a == b || Boolean(a.compareDocumentPosition(b) & 16);
  }
  for (;b && a != b;) {
    b = b.parentNode;
  }
  return b == a;
};
goog.dom.compareNodeOrder = function(a, b) {
  if (a == b) {
    return 0;
  }
  if (a.compareDocumentPosition) {
    return a.compareDocumentPosition(b) & 2 ? 1 : -1;
  }
  if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(9)) {
    if (a.nodeType == goog.dom.NodeType.DOCUMENT) {
      return-1;
    }
    if (b.nodeType == goog.dom.NodeType.DOCUMENT) {
      return 1;
    }
  }
  if ("sourceIndex" in a || a.parentNode && "sourceIndex" in a.parentNode) {
    var c = a.nodeType == goog.dom.NodeType.ELEMENT, d = b.nodeType == goog.dom.NodeType.ELEMENT;
    if (c && d) {
      return a.sourceIndex - b.sourceIndex;
    }
    var e = a.parentNode, f = b.parentNode;
    return e == f ? goog.dom.compareSiblingOrder_(a, b) : !c && goog.dom.contains(e, b) ? -1 * goog.dom.compareParentsDescendantNodeIe_(a, b) : !d && goog.dom.contains(f, a) ? goog.dom.compareParentsDescendantNodeIe_(b, a) : (c ? a.sourceIndex : e.sourceIndex) - (d ? b.sourceIndex : f.sourceIndex);
  }
  d = goog.dom.getOwnerDocument(a);
  c = d.createRange();
  c.selectNode(a);
  c.collapse(!0);
  d = d.createRange();
  d.selectNode(b);
  d.collapse(!0);
  return c.compareBoundaryPoints(goog.global.Range.START_TO_END, d);
};
goog.dom.compareParentsDescendantNodeIe_ = function(a, b) {
  var c = a.parentNode;
  if (c == b) {
    return-1;
  }
  for (var d = b;d.parentNode != c;) {
    d = d.parentNode;
  }
  return goog.dom.compareSiblingOrder_(d, a);
};
goog.dom.compareSiblingOrder_ = function(a, b) {
  for (var c = b;c = c.previousSibling;) {
    if (c == a) {
      return-1;
    }
  }
  return 1;
};
goog.dom.findCommonAncestor = function(a) {
  var b, c = arguments.length;
  if (!c) {
    return null;
  }
  if (1 == c) {
    return arguments[0];
  }
  var d = [], e = Infinity;
  for (b = 0;b < c;b++) {
    for (var f = [], g = arguments[b];g;) {
      f.unshift(g), g = g.parentNode;
    }
    d.push(f);
    e = Math.min(e, f.length);
  }
  f = null;
  for (b = 0;b < e;b++) {
    for (var g = d[0][b], h = 1;h < c;h++) {
      if (g != d[h][b]) {
        return f;
      }
    }
    f = g;
  }
  return f;
};
goog.dom.getOwnerDocument = function(a) {
  return a.nodeType == goog.dom.NodeType.DOCUMENT ? a : a.ownerDocument || a.document;
};
goog.dom.getFrameContentDocument = function(a) {
  return a.contentDocument || a.contentWindow.document;
};
goog.dom.getFrameContentWindow = function(a) {
  return a.contentWindow || goog.dom.getWindow_(goog.dom.getFrameContentDocument(a));
};
goog.dom.setTextContent = function(a, b) {
  if ("textContent" in a) {
    a.textContent = b;
  } else {
    if (a.firstChild && a.firstChild.nodeType == goog.dom.NodeType.TEXT) {
      for (;a.lastChild != a.firstChild;) {
        a.removeChild(a.lastChild);
      }
      a.firstChild.data = b;
    } else {
      goog.dom.removeChildren(a);
      var c = goog.dom.getOwnerDocument(a);
      a.appendChild(c.createTextNode(String(b)));
    }
  }
};
goog.dom.getOuterHtml = function(a) {
  if ("outerHTML" in a) {
    return a.outerHTML;
  }
  var b = goog.dom.getOwnerDocument(a).createElement("div");
  b.appendChild(a.cloneNode(!0));
  return b.innerHTML;
};
goog.dom.findNode = function(a, b) {
  var c = [];
  return goog.dom.findNodes_(a, b, c, !0) ? c[0] : void 0;
};
goog.dom.findNodes = function(a, b) {
  var c = [];
  goog.dom.findNodes_(a, b, c, !1);
  return c;
};
goog.dom.findNodes_ = function(a, b, c, d) {
  if (null != a) {
    for (a = a.firstChild;a;) {
      if (b(a) && (c.push(a), d) || goog.dom.findNodes_(a, b, c, d)) {
        return!0;
      }
      a = a.nextSibling;
    }
  }
  return!1;
};
goog.dom.TAGS_TO_IGNORE_ = {SCRIPT:1, STYLE:1, HEAD:1, IFRAME:1, OBJECT:1};
goog.dom.PREDEFINED_TAG_VALUES_ = {IMG:" ", BR:"\n"};
goog.dom.isFocusableTabIndex = function(a) {
  var b = a.getAttributeNode("tabindex");
  return b && b.specified ? (a = a.tabIndex, goog.isNumber(a) && 0 <= a && 32768 > a) : !1;
};
goog.dom.setFocusableTabIndex = function(a, b) {
  b ? a.tabIndex = 0 : (a.tabIndex = -1, a.removeAttribute("tabIndex"));
};
goog.dom.getTextContent = function(a) {
  if (goog.dom.BrowserFeature.CAN_USE_INNER_TEXT && "innerText" in a) {
    a = goog.string.canonicalizeNewlines(a.innerText);
  } else {
    var b = [];
    goog.dom.getTextContent_(a, b, !0);
    a = b.join("");
  }
  a = a.replace(/ \xAD /g, " ").replace(/\xAD/g, "");
  a = a.replace(/\u200B/g, "");
  goog.dom.BrowserFeature.CAN_USE_INNER_TEXT || (a = a.replace(/ +/g, " "));
  " " != a && (a = a.replace(/^\s*/, ""));
  return a;
};
goog.dom.getRawTextContent = function(a) {
  var b = [];
  goog.dom.getTextContent_(a, b, !1);
  return b.join("");
};
goog.dom.getTextContent_ = function(a, b, c) {
  if (!(a.nodeName in goog.dom.TAGS_TO_IGNORE_)) {
    if (a.nodeType == goog.dom.NodeType.TEXT) {
      c ? b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g, "")) : b.push(a.nodeValue);
    } else {
      if (a.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
        b.push(goog.dom.PREDEFINED_TAG_VALUES_[a.nodeName]);
      } else {
        for (a = a.firstChild;a;) {
          goog.dom.getTextContent_(a, b, c), a = a.nextSibling;
        }
      }
    }
  }
};
goog.dom.getNodeTextLength = function(a) {
  return goog.dom.getTextContent(a).length;
};
goog.dom.getNodeTextOffset = function(a, b) {
  for (var c = b || goog.dom.getOwnerDocument(a).body, d = [];a && a != c;) {
    for (var e = a;e = e.previousSibling;) {
      d.unshift(goog.dom.getTextContent(e));
    }
    a = a.parentNode;
  }
  return goog.string.trimLeft(d.join("")).replace(/ +/g, " ").length;
};
goog.dom.getNodeAtOffset = function(a, b, c) {
  a = [a];
  for (var d = 0, e = null;0 < a.length && d < b;) {
    if (e = a.pop(), !(e.nodeName in goog.dom.TAGS_TO_IGNORE_)) {
      if (e.nodeType == goog.dom.NodeType.TEXT) {
        var f = e.nodeValue.replace(/(\r\n|\r|\n)/g, "").replace(/ +/g, " "), d = d + f.length
      } else {
        if (e.nodeName in goog.dom.PREDEFINED_TAG_VALUES_) {
          d += goog.dom.PREDEFINED_TAG_VALUES_[e.nodeName].length;
        } else {
          for (f = e.childNodes.length - 1;0 <= f;f--) {
            a.push(e.childNodes[f]);
          }
        }
      }
    }
  }
  goog.isObject(c) && (c.remainder = e ? e.nodeValue.length + b - d - 1 : 0, c.node = e);
  return e;
};
goog.dom.isNodeList = function(a) {
  if (a && "number" == typeof a.length) {
    if (goog.isObject(a)) {
      return "function" == typeof a.item || "string" == typeof a.item;
    }
    if (goog.isFunction(a)) {
      return "function" == typeof a.item;
    }
  }
  return!1;
};
goog.dom.getAncestorByTagNameAndClass = function(a, b, c) {
  if (!b && !c) {
    return null;
  }
  var d = b ? b.toUpperCase() : null;
  return goog.dom.getAncestor(a, function(a) {
    return(!d || a.nodeName == d) && (!c || goog.dom.classes.has(a, c));
  }, !0);
};
goog.dom.getAncestorByClass = function(a, b) {
  return goog.dom.getAncestorByTagNameAndClass(a, null, b);
};
goog.dom.getAncestor = function(a, b, c, d) {
  c || (a = a.parentNode);
  c = null == d;
  for (var e = 0;a && (c || e <= d);) {
    if (b(a)) {
      return a;
    }
    a = a.parentNode;
    e++;
  }
  return null;
};
goog.dom.getActiveElement = function(a) {
  try {
    return a && a.activeElement;
  } catch (b) {
  }
  return null;
};
goog.dom.DomHelper = function(a) {
  this.document_ = a || goog.global.document || document;
};
goog.dom.DomHelper.prototype.getDomHelper = goog.dom.getDomHelper;
goog.dom.DomHelper.prototype.setDocument = function(a) {
  this.document_ = a;
};
goog.dom.DomHelper.prototype.getDocument = function() {
  return this.document_;
};
goog.dom.DomHelper.prototype.getElement = function(a) {
  return goog.isString(a) ? this.document_.getElementById(a) : a;
};
goog.dom.DomHelper.prototype.$ = goog.dom.DomHelper.prototype.getElement;
goog.dom.DomHelper.prototype.getElementsByTagNameAndClass = function(a, b, c) {
  return goog.dom.getElementsByTagNameAndClass_(this.document_, a, b, c);
};
goog.dom.DomHelper.prototype.getElementsByClass = function(a, b) {
  return goog.dom.getElementsByClass(a, b || this.document_);
};
goog.dom.DomHelper.prototype.getElementByClass = function(a, b) {
  return goog.dom.getElementByClass(a, b || this.document_);
};
goog.dom.DomHelper.prototype.$$ = goog.dom.DomHelper.prototype.getElementsByTagNameAndClass;
goog.dom.DomHelper.prototype.setProperties = goog.dom.setProperties;
goog.dom.DomHelper.prototype.getViewportSize = function(a) {
  return goog.dom.getViewportSize(a || this.getWindow());
};
goog.dom.DomHelper.prototype.getDocumentHeight = function() {
  return goog.dom.getDocumentHeight_(this.getWindow());
};
goog.dom.DomHelper.prototype.createDom = function(a, b, c) {
  return goog.dom.createDom_(this.document_, arguments);
};
goog.dom.DomHelper.prototype.$dom = goog.dom.DomHelper.prototype.createDom;
goog.dom.DomHelper.prototype.createElement = function(a) {
  return this.document_.createElement(a);
};
goog.dom.DomHelper.prototype.createTextNode = function(a) {
  return this.document_.createTextNode(String(a));
};
goog.dom.DomHelper.prototype.createTable = function(a, b, c) {
  return goog.dom.createTable_(this.document_, a, b, !!c);
};
goog.dom.DomHelper.prototype.htmlToDocumentFragment = function(a) {
  return goog.dom.htmlToDocumentFragment_(this.document_, a);
};
goog.dom.DomHelper.prototype.getCompatMode = function() {
  return this.isCss1CompatMode() ? "CSS1Compat" : "BackCompat";
};
goog.dom.DomHelper.prototype.isCss1CompatMode = function() {
  return goog.dom.isCss1CompatMode_(this.document_);
};
goog.dom.DomHelper.prototype.getWindow = function() {
  return goog.dom.getWindow_(this.document_);
};
goog.dom.DomHelper.prototype.getDocumentScrollElement = function() {
  return goog.dom.getDocumentScrollElement_(this.document_);
};
goog.dom.DomHelper.prototype.getDocumentScroll = function() {
  return goog.dom.getDocumentScroll_(this.document_);
};
goog.dom.DomHelper.prototype.getActiveElement = function(a) {
  return goog.dom.getActiveElement(a || this.document_);
};
goog.dom.DomHelper.prototype.appendChild = goog.dom.appendChild;
goog.dom.DomHelper.prototype.append = goog.dom.append;
goog.dom.DomHelper.prototype.canHaveChildren = goog.dom.canHaveChildren;
goog.dom.DomHelper.prototype.removeChildren = goog.dom.removeChildren;
goog.dom.DomHelper.prototype.insertSiblingBefore = goog.dom.insertSiblingBefore;
goog.dom.DomHelper.prototype.insertSiblingAfter = goog.dom.insertSiblingAfter;
goog.dom.DomHelper.prototype.insertChildAt = goog.dom.insertChildAt;
goog.dom.DomHelper.prototype.removeNode = goog.dom.removeNode;
goog.dom.DomHelper.prototype.replaceNode = goog.dom.replaceNode;
goog.dom.DomHelper.prototype.flattenElement = goog.dom.flattenElement;
goog.dom.DomHelper.prototype.getChildren = goog.dom.getChildren;
goog.dom.DomHelper.prototype.getFirstElementChild = goog.dom.getFirstElementChild;
goog.dom.DomHelper.prototype.getLastElementChild = goog.dom.getLastElementChild;
goog.dom.DomHelper.prototype.getNextElementSibling = goog.dom.getNextElementSibling;
goog.dom.DomHelper.prototype.getPreviousElementSibling = goog.dom.getPreviousElementSibling;
goog.dom.DomHelper.prototype.getNextNode = goog.dom.getNextNode;
goog.dom.DomHelper.prototype.getPreviousNode = goog.dom.getPreviousNode;
goog.dom.DomHelper.prototype.isNodeLike = goog.dom.isNodeLike;
goog.dom.DomHelper.prototype.isElement = goog.dom.isElement;
goog.dom.DomHelper.prototype.isWindow = goog.dom.isWindow;
goog.dom.DomHelper.prototype.getParentElement = goog.dom.getParentElement;
goog.dom.DomHelper.prototype.contains = goog.dom.contains;
goog.dom.DomHelper.prototype.compareNodeOrder = goog.dom.compareNodeOrder;
goog.dom.DomHelper.prototype.findCommonAncestor = goog.dom.findCommonAncestor;
goog.dom.DomHelper.prototype.getOwnerDocument = goog.dom.getOwnerDocument;
goog.dom.DomHelper.prototype.getFrameContentDocument = goog.dom.getFrameContentDocument;
goog.dom.DomHelper.prototype.getFrameContentWindow = goog.dom.getFrameContentWindow;
goog.dom.DomHelper.prototype.setTextContent = goog.dom.setTextContent;
goog.dom.DomHelper.prototype.getOuterHtml = goog.dom.getOuterHtml;
goog.dom.DomHelper.prototype.findNode = goog.dom.findNode;
goog.dom.DomHelper.prototype.findNodes = goog.dom.findNodes;
goog.dom.DomHelper.prototype.isFocusableTabIndex = goog.dom.isFocusableTabIndex;
goog.dom.DomHelper.prototype.setFocusableTabIndex = goog.dom.setFocusableTabIndex;
goog.dom.DomHelper.prototype.getTextContent = goog.dom.getTextContent;
goog.dom.DomHelper.prototype.getNodeTextLength = goog.dom.getNodeTextLength;
goog.dom.DomHelper.prototype.getNodeTextOffset = goog.dom.getNodeTextOffset;
goog.dom.DomHelper.prototype.getNodeAtOffset = goog.dom.getNodeAtOffset;
goog.dom.DomHelper.prototype.isNodeList = goog.dom.isNodeList;
goog.dom.DomHelper.prototype.getAncestorByTagNameAndClass = goog.dom.getAncestorByTagNameAndClass;
goog.dom.DomHelper.prototype.getAncestorByClass = goog.dom.getAncestorByClass;
goog.dom.DomHelper.prototype.getAncestor = goog.dom.getAncestor;
goog.dom.vendor = {};
goog.dom.vendor.getVendorJsPrefix = function() {
  return goog.userAgent.WEBKIT ? "Webkit" : goog.userAgent.GECKO ? "Moz" : goog.userAgent.IE ? "ms" : goog.userAgent.OPERA ? "O" : null;
};
goog.dom.vendor.getVendorPrefix = function() {
  return goog.userAgent.WEBKIT ? "-webkit" : goog.userAgent.GECKO ? "-moz" : goog.userAgent.IE ? "-ms" : goog.userAgent.OPERA ? "-o" : null;
};
goog.math.Box = function(a, b, c, d) {
  this.top = a;
  this.right = b;
  this.bottom = c;
  this.left = d;
};
goog.math.Box.boundingBox = function(a) {
  for (var b = new goog.math.Box(arguments[0].y, arguments[0].x, arguments[0].y, arguments[0].x), c = 1;c < arguments.length;c++) {
    var d = arguments[c];
    b.top = Math.min(b.top, d.y);
    b.right = Math.max(b.right, d.x);
    b.bottom = Math.max(b.bottom, d.y);
    b.left = Math.min(b.left, d.x);
  }
  return b;
};
goog.math.Box.prototype.clone = function() {
  return new goog.math.Box(this.top, this.right, this.bottom, this.left);
};
goog.DEBUG && (goog.math.Box.prototype.toString = function() {
  return "(" + this.top + "t, " + this.right + "r, " + this.bottom + "b, " + this.left + "l)";
});
goog.math.Box.prototype.contains = function(a) {
  return goog.math.Box.contains(this, a);
};
goog.math.Box.prototype.expand = function(a, b, c, d) {
  goog.isObject(a) ? (this.top -= a.top, this.right += a.right, this.bottom += a.bottom, this.left -= a.left) : (this.top -= a, this.right += b, this.bottom += c, this.left -= d);
  return this;
};
goog.math.Box.prototype.expandToInclude = function(a) {
  this.left = Math.min(this.left, a.left);
  this.top = Math.min(this.top, a.top);
  this.right = Math.max(this.right, a.right);
  this.bottom = Math.max(this.bottom, a.bottom);
};
goog.math.Box.equals = function(a, b) {
  return a == b ? !0 : a && b ? a.top == b.top && a.right == b.right && a.bottom == b.bottom && a.left == b.left : !1;
};
goog.math.Box.contains = function(a, b) {
  return a && b ? b instanceof goog.math.Box ? b.left >= a.left && b.right <= a.right && b.top >= a.top && b.bottom <= a.bottom : b.x >= a.left && b.x <= a.right && b.y >= a.top && b.y <= a.bottom : !1;
};
goog.math.Box.relativePositionX = function(a, b) {
  return b.x < a.left ? b.x - a.left : b.x > a.right ? b.x - a.right : 0;
};
goog.math.Box.relativePositionY = function(a, b) {
  return b.y < a.top ? b.y - a.top : b.y > a.bottom ? b.y - a.bottom : 0;
};
goog.math.Box.distance = function(a, b) {
  var c = goog.math.Box.relativePositionX(a, b), d = goog.math.Box.relativePositionY(a, b);
  return Math.sqrt(c * c + d * d);
};
goog.math.Box.intersects = function(a, b) {
  return a.left <= b.right && b.left <= a.right && a.top <= b.bottom && b.top <= a.bottom;
};
goog.math.Box.intersectsWithPadding = function(a, b, c) {
  return a.left <= b.right + c && b.left <= a.right + c && a.top <= b.bottom + c && b.top <= a.bottom + c;
};
goog.math.Box.prototype.ceil = function() {
  this.top = Math.ceil(this.top);
  this.right = Math.ceil(this.right);
  this.bottom = Math.ceil(this.bottom);
  this.left = Math.ceil(this.left);
  return this;
};
goog.math.Box.prototype.floor = function() {
  this.top = Math.floor(this.top);
  this.right = Math.floor(this.right);
  this.bottom = Math.floor(this.bottom);
  this.left = Math.floor(this.left);
  return this;
};
goog.math.Box.prototype.round = function() {
  this.top = Math.round(this.top);
  this.right = Math.round(this.right);
  this.bottom = Math.round(this.bottom);
  this.left = Math.round(this.left);
  return this;
};
goog.math.Box.prototype.translate = function(a, b) {
  a instanceof goog.math.Coordinate ? (this.left += a.x, this.right += a.x, this.top += a.y, this.bottom += a.y) : (this.left += a, this.right += a, goog.isNumber(b) && (this.top += b, this.bottom += b));
  return this;
};
goog.math.Box.prototype.scale = function(a, b) {
  var c = goog.isNumber(b) ? b : a;
  this.left *= a;
  this.right *= a;
  this.top *= c;
  this.bottom *= c;
  return this;
};
goog.math.Rect = function(a, b, c, d) {
  this.left = a;
  this.top = b;
  this.width = c;
  this.height = d;
};
goog.math.Rect.prototype.clone = function() {
  return new goog.math.Rect(this.left, this.top, this.width, this.height);
};
goog.math.Rect.prototype.toBox = function() {
  return new goog.math.Box(this.top, this.left + this.width, this.top + this.height, this.left);
};
goog.math.Rect.createFromBox = function(a) {
  return new goog.math.Rect(a.left, a.top, a.right - a.left, a.bottom - a.top);
};
goog.DEBUG && (goog.math.Rect.prototype.toString = function() {
  return "(" + this.left + ", " + this.top + " - " + this.width + "w x " + this.height + "h)";
});
goog.math.Rect.equals = function(a, b) {
  return a == b ? !0 : a && b ? a.left == b.left && a.width == b.width && a.top == b.top && a.height == b.height : !1;
};
goog.math.Rect.prototype.intersection = function(a) {
  var b = Math.max(this.left, a.left), c = Math.min(this.left + this.width, a.left + a.width);
  if (b <= c) {
    var d = Math.max(this.top, a.top);
    a = Math.min(this.top + this.height, a.top + a.height);
    if (d <= a) {
      return this.left = b, this.top = d, this.width = c - b, this.height = a - d, !0;
    }
  }
  return!1;
};
goog.math.Rect.intersection = function(a, b) {
  var c = Math.max(a.left, b.left), d = Math.min(a.left + a.width, b.left + b.width);
  if (c <= d) {
    var e = Math.max(a.top, b.top), f = Math.min(a.top + a.height, b.top + b.height);
    if (e <= f) {
      return new goog.math.Rect(c, e, d - c, f - e);
    }
  }
  return null;
};
goog.math.Rect.intersects = function(a, b) {
  return a.left <= b.left + b.width && b.left <= a.left + a.width && a.top <= b.top + b.height && b.top <= a.top + a.height;
};
goog.math.Rect.prototype.intersects = function(a) {
  return goog.math.Rect.intersects(this, a);
};
goog.math.Rect.difference = function(a, b) {
  var c = goog.math.Rect.intersection(a, b);
  if (!c || !c.height || !c.width) {
    return[a.clone()];
  }
  var c = [], d = a.top, e = a.height, f = a.left + a.width, g = a.top + a.height, h = b.left + b.width, k = b.top + b.height;
  b.top > a.top && (c.push(new goog.math.Rect(a.left, a.top, a.width, b.top - a.top)), d = b.top, e -= b.top - a.top);
  k < g && (c.push(new goog.math.Rect(a.left, k, a.width, g - k)), e = k - d);
  b.left > a.left && c.push(new goog.math.Rect(a.left, d, b.left - a.left, e));
  h < f && c.push(new goog.math.Rect(h, d, f - h, e));
  return c;
};
goog.math.Rect.prototype.difference = function(a) {
  return goog.math.Rect.difference(this, a);
};
goog.math.Rect.prototype.boundingRect = function(a) {
  var b = Math.max(this.left + this.width, a.left + a.width), c = Math.max(this.top + this.height, a.top + a.height);
  this.left = Math.min(this.left, a.left);
  this.top = Math.min(this.top, a.top);
  this.width = b - this.left;
  this.height = c - this.top;
};
goog.math.Rect.boundingRect = function(a, b) {
  if (!a || !b) {
    return null;
  }
  var c = a.clone();
  c.boundingRect(b);
  return c;
};
goog.math.Rect.prototype.contains = function(a) {
  return a instanceof goog.math.Rect ? this.left <= a.left && this.left + this.width >= a.left + a.width && this.top <= a.top && this.top + this.height >= a.top + a.height : a.x >= this.left && a.x <= this.left + this.width && a.y >= this.top && a.y <= this.top + this.height;
};
goog.math.Rect.prototype.getSize = function() {
  return new goog.math.Size(this.width, this.height);
};
goog.math.Rect.prototype.ceil = function() {
  this.left = Math.ceil(this.left);
  this.top = Math.ceil(this.top);
  this.width = Math.ceil(this.width);
  this.height = Math.ceil(this.height);
  return this;
};
goog.math.Rect.prototype.floor = function() {
  this.left = Math.floor(this.left);
  this.top = Math.floor(this.top);
  this.width = Math.floor(this.width);
  this.height = Math.floor(this.height);
  return this;
};
goog.math.Rect.prototype.round = function() {
  this.left = Math.round(this.left);
  this.top = Math.round(this.top);
  this.width = Math.round(this.width);
  this.height = Math.round(this.height);
  return this;
};
goog.math.Rect.prototype.translate = function(a, b) {
  a instanceof goog.math.Coordinate ? (this.left += a.x, this.top += a.y) : (this.left += a, goog.isNumber(b) && (this.top += b));
  return this;
};
goog.math.Rect.prototype.scale = function(a, b) {
  var c = goog.isNumber(b) ? b : a;
  this.left *= a;
  this.width *= a;
  this.top *= c;
  this.height *= c;
  return this;
};
goog.style = {};
goog.style.setStyle = function(a, b, c) {
  goog.isString(b) ? goog.style.setStyle_(a, c, b) : goog.object.forEach(b, goog.partial(goog.style.setStyle_, a));
};
goog.style.setStyle_ = function(a, b, c) {
  (c = goog.style.getVendorJsStyleName_(a, c)) && (a.style[c] = b);
};
goog.style.getVendorJsStyleName_ = function(a, b) {
  var c = goog.string.toCamelCase(b);
  if (void 0 === a.style[c]) {
    var d = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(b);
    if (void 0 !== a.style[d]) {
      return d;
    }
  }
  return c;
};
goog.style.getVendorStyleName_ = function(a, b) {
  var c = goog.string.toCamelCase(b);
  return void 0 === a.style[c] && (c = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(b), void 0 !== a.style[c]) ? goog.dom.vendor.getVendorPrefix() + "-" + b : b;
};
goog.style.getStyle = function(a, b) {
  var c = a.style[goog.string.toCamelCase(b)];
  return "undefined" !== typeof c ? c : a.style[goog.style.getVendorJsStyleName_(a, b)] || "";
};
goog.style.getComputedStyle = function(a, b) {
  var c = goog.dom.getOwnerDocument(a);
  return c.defaultView && c.defaultView.getComputedStyle && (c = c.defaultView.getComputedStyle(a, null)) ? c[b] || c.getPropertyValue(b) || "" : "";
};
goog.style.getCascadedStyle = function(a, b) {
  return a.currentStyle ? a.currentStyle[b] : null;
};
goog.style.getStyle_ = function(a, b) {
  return goog.style.getComputedStyle(a, b) || goog.style.getCascadedStyle(a, b) || a.style && a.style[b];
};
goog.style.getComputedPosition = function(a) {
  return goog.style.getStyle_(a, "position");
};
goog.style.getBackgroundColor = function(a) {
  return goog.style.getStyle_(a, "backgroundColor");
};
goog.style.getComputedOverflowX = function(a) {
  return goog.style.getStyle_(a, "overflowX");
};
goog.style.getComputedOverflowY = function(a) {
  return goog.style.getStyle_(a, "overflowY");
};
goog.style.getComputedZIndex = function(a) {
  return goog.style.getStyle_(a, "zIndex");
};
goog.style.getComputedTextAlign = function(a) {
  return goog.style.getStyle_(a, "textAlign");
};
goog.style.getComputedCursor = function(a) {
  return goog.style.getStyle_(a, "cursor");
};
goog.style.setPosition = function(a, b, c) {
  var d, e = goog.userAgent.GECKO && (goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.isVersion("1.9");
  b instanceof goog.math.Coordinate ? (d = b.x, b = b.y) : (d = b, b = c);
  a.style.left = goog.style.getPixelStyleValue_(d, e);
  a.style.top = goog.style.getPixelStyleValue_(b, e);
};
goog.style.getPosition = function(a) {
  return new goog.math.Coordinate(a.offsetLeft, a.offsetTop);
};
goog.style.getClientViewportElement = function(a) {
  a = a ? goog.dom.getOwnerDocument(a) : goog.dom.getDocument();
  return!goog.userAgent.IE || goog.userAgent.isDocumentMode(9) || goog.dom.getDomHelper(a).isCss1CompatMode() ? a.documentElement : a.body;
};
goog.style.getViewportPageOffset = function(a) {
  var b = a.body;
  a = a.documentElement;
  return new goog.math.Coordinate(b.scrollLeft || a.scrollLeft, b.scrollTop || a.scrollTop);
};
goog.style.getBoundingClientRect_ = function(a) {
  var b = a.getBoundingClientRect();
  goog.userAgent.IE && (a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop);
  return b;
};
goog.style.getOffsetParent = function(a) {
  if (goog.userAgent.IE && !goog.userAgent.isDocumentMode(8)) {
    return a.offsetParent;
  }
  var b = goog.dom.getOwnerDocument(a), c = goog.style.getStyle_(a, "position"), d = "fixed" == c || "absolute" == c;
  for (a = a.parentNode;a && a != b;a = a.parentNode) {
    if (c = goog.style.getStyle_(a, "position"), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth || a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) {
      return a;
    }
  }
  return null;
};
goog.style.getVisibleRectForElement = function(a) {
  for (var b = new goog.math.Box(0, Infinity, Infinity, 0), c = goog.dom.getDomHelper(a), d = c.getDocument().body, e = c.getDocument().documentElement, f = c.getDocumentScrollElement();a = goog.style.getOffsetParent(a);) {
    if (!(goog.userAgent.IE && 0 == a.clientWidth || goog.userAgent.WEBKIT && 0 == a.clientHeight && a == d || a == d || a == e || "visible" == goog.style.getStyle_(a, "overflow"))) {
      var g = goog.style.getPageOffset(a), h = goog.style.getClientLeftTop(a);
      g.x += h.x;
      g.y += h.y;
      b.top = Math.max(b.top, g.y);
      b.right = Math.min(b.right, g.x + a.clientWidth);
      b.bottom = Math.min(b.bottom, g.y + a.clientHeight);
      b.left = Math.max(b.left, g.x);
    }
  }
  d = f.scrollLeft;
  f = f.scrollTop;
  b.left = Math.max(b.left, d);
  b.top = Math.max(b.top, f);
  c = c.getViewportSize();
  b.right = Math.min(b.right, d + c.width);
  b.bottom = Math.min(b.bottom, f + c.height);
  return 0 <= b.top && 0 <= b.left && b.bottom > b.top && b.right > b.left ? b : null;
};
goog.style.getContainerOffsetToScrollInto = function(a, b, c) {
  var d = goog.style.getPageOffset(a), e = goog.style.getPageOffset(b), f = goog.style.getBorderBox(b), g = d.x - e.x - f.left, d = d.y - e.y - f.top, e = b.clientWidth - a.offsetWidth;
  a = b.clientHeight - a.offsetHeight;
  f = b.scrollLeft;
  b = b.scrollTop;
  c ? (f += g - e / 2, b += d - a / 2) : (f += Math.min(g, Math.max(g - e, 0)), b += Math.min(d, Math.max(d - a, 0)));
  return new goog.math.Coordinate(f, b);
};
goog.style.scrollIntoContainerView = function(a, b, c) {
  a = goog.style.getContainerOffsetToScrollInto(a, b, c);
  b.scrollLeft = a.x;
  b.scrollTop = a.y;
};
goog.style.getClientLeftTop = function(a) {
  if (goog.userAgent.GECKO && !goog.userAgent.isVersion("1.9")) {
    var b = parseFloat(goog.style.getComputedStyle(a, "borderLeftWidth"));
    if (goog.style.isRightToLeft(a)) {
      var c = a.offsetWidth - a.clientWidth - b - parseFloat(goog.style.getComputedStyle(a, "borderRightWidth")), b = b + c
    }
    return new goog.math.Coordinate(b, parseFloat(goog.style.getComputedStyle(a, "borderTopWidth")));
  }
  return new goog.math.Coordinate(a.clientLeft, a.clientTop);
};
goog.style.getPageOffset = function(a) {
  var b, c = goog.dom.getOwnerDocument(a), d = goog.style.getStyle_(a, "position");
  goog.asserts.assertObject(a, "Parameter is required");
  var e = goog.userAgent.GECKO && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), f = new goog.math.Coordinate(0, 0), g = goog.style.getClientViewportElement(c);
  if (a == g) {
    return f;
  }
  if (a.getBoundingClientRect) {
    b = goog.style.getBoundingClientRect_(a), a = goog.dom.getDomHelper(c).getDocumentScroll(), f.x = b.left + a.x, f.y = b.top + a.y;
  } else {
    if (c.getBoxObjectFor && !e) {
      b = c.getBoxObjectFor(a), a = c.getBoxObjectFor(g), f.x = b.screenX - a.screenX, f.y = b.screenY - a.screenY;
    } else {
      b = a;
      do {
        f.x += b.offsetLeft;
        f.y += b.offsetTop;
        b != a && (f.x += b.clientLeft || 0, f.y += b.clientTop || 0);
        if (goog.userAgent.WEBKIT && "fixed" == goog.style.getComputedPosition(b)) {
          f.x += c.body.scrollLeft;
          f.y += c.body.scrollTop;
          break;
        }
        b = b.offsetParent;
      } while (b && b != a);
      if (goog.userAgent.OPERA || goog.userAgent.WEBKIT && "absolute" == d) {
        f.y -= c.body.offsetTop;
      }
      for (b = a;(b = goog.style.getOffsetParent(b)) && b != c.body && b != g;) {
        f.x -= b.scrollLeft, goog.userAgent.OPERA && "TR" == b.tagName || (f.y -= b.scrollTop);
      }
    }
  }
  return f;
};
goog.style.getPageOffsetLeft = function(a) {
  return goog.style.getPageOffset(a).x;
};
goog.style.getPageOffsetTop = function(a) {
  return goog.style.getPageOffset(a).y;
};
goog.style.getFramedPageOffset = function(a, b) {
  var c = new goog.math.Coordinate(0, 0), d = goog.dom.getWindow(goog.dom.getOwnerDocument(a)), e = a;
  do {
    var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPosition(e);
    c.x += f.x;
    c.y += f.y;
  } while (d && d != b && (e = d.frameElement) && (d = d.parent));
  return c;
};
goog.style.translateRectForAnotherFrame = function(a, b, c) {
  if (b.getDocument() != c.getDocument()) {
    var d = b.getDocument().body;
    c = goog.style.getFramedPageOffset(d, c.getWindow());
    c = goog.math.Coordinate.difference(c, goog.style.getPageOffset(d));
    goog.userAgent.IE && !b.isCss1CompatMode() && (c = goog.math.Coordinate.difference(c, b.getDocumentScroll()));
    a.left += c.x;
    a.top += c.y;
  }
};
goog.style.getRelativePosition = function(a, b) {
  var c = goog.style.getClientPosition(a), d = goog.style.getClientPosition(b);
  return new goog.math.Coordinate(c.x - d.x, c.y - d.y);
};
goog.style.getClientPosition = function(a) {
  var b = new goog.math.Coordinate;
  if (a.nodeType == goog.dom.NodeType.ELEMENT) {
    if (a.getBoundingClientRect) {
      var c = goog.style.getBoundingClientRect_(a);
      b.x = c.left;
      b.y = c.top;
    } else {
      var c = goog.dom.getDomHelper(a).getDocumentScroll(), d = goog.style.getPageOffset(a);
      b.x = d.x - c.x;
      b.y = d.y - c.y;
    }
    goog.userAgent.GECKO && !goog.userAgent.isVersion(12) && (b = goog.math.Coordinate.sum(b, goog.style.getCssTranslation(a)));
  } else {
    c = goog.isFunction(a.getBrowserEvent), d = a, a.targetTouches ? d = a.targetTouches[0] : c && a.getBrowserEvent().targetTouches && (d = a.getBrowserEvent().targetTouches[0]), b.x = d.clientX, b.y = d.clientY;
  }
  return b;
};
goog.style.setPageOffset = function(a, b, c) {
  var d = goog.style.getPageOffset(a);
  b instanceof goog.math.Coordinate && (c = b.y, b = b.x);
  goog.style.setPosition(a, a.offsetLeft + (b - d.x), a.offsetTop + (c - d.y));
};
goog.style.setSize = function(a, b, c) {
  if (b instanceof goog.math.Size) {
    c = b.height, b = b.width;
  } else {
    if (void 0 == c) {
      throw Error("missing height argument");
    }
  }
  goog.style.setWidth(a, b);
  goog.style.setHeight(a, c);
};
goog.style.getPixelStyleValue_ = function(a, b) {
  "number" == typeof a && (a = (b ? Math.round(a) : a) + "px");
  return a;
};
goog.style.setHeight = function(a, b) {
  a.style.height = goog.style.getPixelStyleValue_(b, !0);
};
goog.style.setWidth = function(a, b) {
  a.style.width = goog.style.getPixelStyleValue_(b, !0);
};
goog.style.getSize = function(a) {
  if ("none" != goog.style.getStyle_(a, "display")) {
    return goog.style.getSizeWithDisplay_(a);
  }
  var b = a.style, c = b.display, d = b.visibility, e = b.position;
  b.visibility = "hidden";
  b.position = "absolute";
  b.display = "inline";
  a = goog.style.getSizeWithDisplay_(a);
  b.display = c;
  b.position = e;
  b.visibility = d;
  return a;
};
goog.style.getSizeWithDisplay_ = function(a) {
  var b = a.offsetWidth, c = a.offsetHeight, d = goog.userAgent.WEBKIT && !b && !c;
  return goog.isDef(b) && !d || !a.getBoundingClientRect ? new goog.math.Size(b, c) : (a = goog.style.getBoundingClientRect_(a), new goog.math.Size(a.right - a.left, a.bottom - a.top));
};
goog.style.getBounds = function(a) {
  var b = goog.style.getPageOffset(a);
  a = goog.style.getSize(a);
  return new goog.math.Rect(b.x, b.y, a.width, a.height);
};
goog.style.toCamelCase = function(a) {
  return goog.string.toCamelCase(String(a));
};
goog.style.toSelectorCase = function(a) {
  return goog.string.toSelectorCase(a);
};
goog.style.getOpacity = function(a) {
  var b = a.style;
  a = "";
  "opacity" in b ? a = b.opacity : "MozOpacity" in b ? a = b.MozOpacity : "filter" in b && (b = b.filter.match(/alpha\(opacity=([\d.]+)\)/)) && (a = String(b[1] / 100));
  return "" == a ? a : Number(a);
};
goog.style.setOpacity = function(a, b) {
  var c = a.style;
  "opacity" in c ? c.opacity = b : "MozOpacity" in c ? c.MozOpacity = b : "filter" in c && (c.filter = "" === b ? "" : "alpha(opacity\x3d" + 100 * b + ")");
};
goog.style.setTransparentBackgroundImage = function(a, b) {
  var c = a.style;
  goog.userAgent.IE && !goog.userAgent.isVersion("8") ? c.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src\x3d"' + b + '", sizingMethod\x3d"crop")' : (c.backgroundImage = "url(" + b + ")", c.backgroundPosition = "top left", c.backgroundRepeat = "no-repeat");
};
goog.style.clearTransparentBackgroundImage = function(a) {
  a = a.style;
  "filter" in a ? a.filter = "" : a.backgroundImage = "none";
};
goog.style.showElement = function(a, b) {
  a.style.display = b ? "" : "none";
};
goog.style.isElementShown = function(a) {
  return "none" != a.style.display;
};
goog.style.installStyles = function(a, b) {
  var c = goog.dom.getDomHelper(b), d = null;
  if (goog.userAgent.IE) {
    d = c.getDocument().createStyleSheet(), goog.style.setStyles(d, a);
  } else {
    var e = c.getElementsByTagNameAndClass("head")[0];
    e || (d = c.getElementsByTagNameAndClass("body")[0], e = c.createDom("head"), d.parentNode.insertBefore(e, d));
    d = c.createDom("style");
    goog.style.setStyles(d, a);
    c.appendChild(e, d);
  }
  return d;
};
goog.style.uninstallStyles = function(a) {
  goog.dom.removeNode(a.ownerNode || a.owningElement || a);
};
goog.style.setStyles = function(a, b) {
  goog.userAgent.IE ? a.cssText = b : a.innerHTML = b;
};
goog.style.setPreWrap = function(a) {
  a = a.style;
  goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.whiteSpace = "pre", a.wordWrap = "break-word") : a.whiteSpace = goog.userAgent.GECKO ? "-moz-pre-wrap" : "pre-wrap";
};
goog.style.setInlineBlock = function(a) {
  a = a.style;
  a.position = "relative";
  goog.userAgent.IE && !goog.userAgent.isVersion("8") ? (a.zoom = "1", a.display = "inline") : a.display = goog.userAgent.GECKO ? goog.userAgent.isVersion("1.9a") ? "inline-block" : "-moz-inline-box" : "inline-block";
};
goog.style.isRightToLeft = function(a) {
  return "rtl" == goog.style.getStyle_(a, "direction");
};
goog.style.unselectableStyle_ = goog.userAgent.GECKO ? "MozUserSelect" : goog.userAgent.WEBKIT ? "WebkitUserSelect" : null;
goog.style.isUnselectable = function(a) {
  return goog.style.unselectableStyle_ ? "none" == a.style[goog.style.unselectableStyle_].toLowerCase() : goog.userAgent.IE || goog.userAgent.OPERA ? "on" == a.getAttribute("unselectable") : !1;
};
goog.style.setUnselectable = function(a, b, c) {
  c = c ? null : a.getElementsByTagName("*");
  var d = goog.style.unselectableStyle_;
  if (d) {
    if (b = b ? "none" : "", a.style[d] = b, c) {
      a = 0;
      for (var e;e = c[a];a++) {
        e.style[d] = b;
      }
    }
  } else {
    if (goog.userAgent.IE || goog.userAgent.OPERA) {
      if (b = b ? "on" : "", a.setAttribute("unselectable", b), c) {
        for (a = 0;e = c[a];a++) {
          e.setAttribute("unselectable", b);
        }
      }
    }
  }
};
goog.style.getBorderBoxSize = function(a) {
  return new goog.math.Size(a.offsetWidth, a.offsetHeight);
};
goog.style.setBorderBoxSize = function(a, b) {
  var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
  if (!goog.userAgent.IE || d && goog.userAgent.isVersion("8")) {
    goog.style.setBoxSizingSize_(a, b, "border-box");
  } else {
    if (c = a.style, d) {
      var d = goog.style.getPaddingBox(a), e = goog.style.getBorderBox(a);
      c.pixelWidth = b.width - e.left - d.left - d.right - e.right;
      c.pixelHeight = b.height - e.top - d.top - d.bottom - e.bottom;
    } else {
      c.pixelWidth = b.width, c.pixelHeight = b.height;
    }
  }
};
goog.style.getContentBoxSize = function(a) {
  var b = goog.dom.getOwnerDocument(a), c = goog.userAgent.IE && a.currentStyle;
  if (c && goog.dom.getDomHelper(b).isCss1CompatMode() && "auto" != c.width && "auto" != c.height && !c.boxSizing) {
    return b = goog.style.getIePixelValue_(a, c.width, "width", "pixelWidth"), a = goog.style.getIePixelValue_(a, c.height, "height", "pixelHeight"), new goog.math.Size(b, a);
  }
  c = goog.style.getBorderBoxSize(a);
  b = goog.style.getPaddingBox(a);
  a = goog.style.getBorderBox(a);
  return new goog.math.Size(c.width - a.left - b.left - b.right - a.right, c.height - a.top - b.top - b.bottom - a.bottom);
};
goog.style.setContentBoxSize = function(a, b) {
  var c = goog.dom.getOwnerDocument(a), d = goog.dom.getDomHelper(c).isCss1CompatMode();
  if (!goog.userAgent.IE || d && goog.userAgent.isVersion("8")) {
    goog.style.setBoxSizingSize_(a, b, "content-box");
  } else {
    if (c = a.style, d) {
      c.pixelWidth = b.width, c.pixelHeight = b.height;
    } else {
      var d = goog.style.getPaddingBox(a), e = goog.style.getBorderBox(a);
      c.pixelWidth = b.width + e.left + d.left + d.right + e.right;
      c.pixelHeight = b.height + e.top + d.top + d.bottom + e.bottom;
    }
  }
};
goog.style.setBoxSizingSize_ = function(a, b, c) {
  a = a.style;
  goog.userAgent.GECKO ? a.MozBoxSizing = c : goog.userAgent.WEBKIT ? a.WebkitBoxSizing = c : a.boxSizing = c;
  a.width = Math.max(b.width, 0) + "px";
  a.height = Math.max(b.height, 0) + "px";
};
goog.style.getIePixelValue_ = function(a, b, c, d) {
  if (/^\d+px?$/.test(b)) {
    return parseInt(b, 10);
  }
  var e = a.style[c], f = a.runtimeStyle[c];
  a.runtimeStyle[c] = a.currentStyle[c];
  a.style[c] = b;
  b = a.style[d];
  a.style[c] = e;
  a.runtimeStyle[c] = f;
  return b;
};
goog.style.getIePixelDistance_ = function(a, b) {
  var c = goog.style.getCascadedStyle(a, b);
  return c ? goog.style.getIePixelValue_(a, c, "left", "pixelLeft") : 0;
};
goog.style.getBox_ = function(a, b) {
  if (goog.userAgent.IE) {
    var c = goog.style.getIePixelDistance_(a, b + "Left"), d = goog.style.getIePixelDistance_(a, b + "Right"), e = goog.style.getIePixelDistance_(a, b + "Top"), f = goog.style.getIePixelDistance_(a, b + "Bottom");
    return new goog.math.Box(e, d, f, c);
  }
  c = goog.style.getComputedStyle(a, b + "Left");
  d = goog.style.getComputedStyle(a, b + "Right");
  e = goog.style.getComputedStyle(a, b + "Top");
  f = goog.style.getComputedStyle(a, b + "Bottom");
  return new goog.math.Box(parseFloat(e), parseFloat(d), parseFloat(f), parseFloat(c));
};
goog.style.getPaddingBox = function(a) {
  return goog.style.getBox_(a, "padding");
};
goog.style.getMarginBox = function(a) {
  return goog.style.getBox_(a, "margin");
};
goog.style.ieBorderWidthKeywords_ = {thin:2, medium:4, thick:6};
goog.style.getIePixelBorder_ = function(a, b) {
  if ("none" == goog.style.getCascadedStyle(a, b + "Style")) {
    return 0;
  }
  var c = goog.style.getCascadedStyle(a, b + "Width");
  return c in goog.style.ieBorderWidthKeywords_ ? goog.style.ieBorderWidthKeywords_[c] : goog.style.getIePixelValue_(a, c, "left", "pixelLeft");
};
goog.style.getBorderBox = function(a) {
  if (goog.userAgent.IE) {
    var b = goog.style.getIePixelBorder_(a, "borderLeft"), c = goog.style.getIePixelBorder_(a, "borderRight"), d = goog.style.getIePixelBorder_(a, "borderTop");
    a = goog.style.getIePixelBorder_(a, "borderBottom");
    return new goog.math.Box(d, c, a, b);
  }
  b = goog.style.getComputedStyle(a, "borderLeftWidth");
  c = goog.style.getComputedStyle(a, "borderRightWidth");
  d = goog.style.getComputedStyle(a, "borderTopWidth");
  a = goog.style.getComputedStyle(a, "borderBottomWidth");
  return new goog.math.Box(parseFloat(d), parseFloat(c), parseFloat(a), parseFloat(b));
};
goog.style.getFontFamily = function(a) {
  var b = goog.dom.getOwnerDocument(a), c = "";
  if (b.body.createTextRange) {
    b = b.body.createTextRange();
    b.moveToElementText(a);
    try {
      c = b.queryCommandValue("FontName");
    } catch (d) {
      c = "";
    }
  }
  c || (c = goog.style.getStyle_(a, "fontFamily"));
  a = c.split(",");
  1 < a.length && (c = a[0]);
  return goog.string.stripQuotes(c, "\"'");
};
goog.style.lengthUnitRegex_ = /[^\d]+$/;
goog.style.getLengthUnits = function(a) {
  return(a = a.match(goog.style.lengthUnitRegex_)) && a[0] || null;
};
goog.style.ABSOLUTE_CSS_LENGTH_UNITS_ = {cm:1, "in":1, mm:1, pc:1, pt:1};
goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_ = {em:1, ex:1};
goog.style.getFontSize = function(a) {
  var b = goog.style.getStyle_(a, "fontSize"), c = goog.style.getLengthUnits(b);
  if (b && "px" == c) {
    return parseInt(b, 10);
  }
  if (goog.userAgent.IE) {
    if (c in goog.style.ABSOLUTE_CSS_LENGTH_UNITS_) {
      return goog.style.getIePixelValue_(a, b, "left", "pixelLeft");
    }
    if (a.parentNode && a.parentNode.nodeType == goog.dom.NodeType.ELEMENT && c in goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_) {
      return a = a.parentNode, c = goog.style.getStyle_(a, "fontSize"), goog.style.getIePixelValue_(a, b == c ? "1em" : b, "left", "pixelLeft");
    }
  }
  c = goog.dom.createDom("span", {style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});
  goog.dom.appendChild(a, c);
  b = c.offsetHeight;
  goog.dom.removeNode(c);
  return b;
};
goog.style.parseStyleAttribute = function(a) {
  var b = {};
  goog.array.forEach(a.split(/\s*;\s*/), function(a) {
    a = a.split(/\s*:\s*/);
    2 == a.length && (b[goog.string.toCamelCase(a[0].toLowerCase())] = a[1]);
  });
  return b;
};
goog.style.toStyleAttribute = function(a) {
  var b = [];
  goog.object.forEach(a, function(a, d) {
    b.push(goog.string.toSelectorCase(d), ":", a, ";");
  });
  return b.join("");
};
goog.style.setFloat = function(a, b) {
  a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] = b;
};
goog.style.getFloat = function(a) {
  return a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] || "";
};
goog.style.getScrollbarWidth = function(a) {
  var b = goog.dom.createElement("div");
  a && (b.className = a);
  b.style.cssText = "overflow:auto;position:absolute;top:0;width:100px;height:100px";
  a = goog.dom.createElement("div");
  goog.style.setSize(a, "200px", "200px");
  b.appendChild(a);
  goog.dom.appendChild(goog.dom.getDocument().body, b);
  a = b.offsetWidth - b.clientWidth;
  goog.dom.removeNode(b);
  return a;
};
goog.style.MATRIX_TRANSLATION_REGEX_ = /matrix\([0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, [0-9\.\-]+, ([0-9\.\-]+)p?x?, ([0-9\.\-]+)p?x?\)/;
goog.style.getCssTranslation = function(a) {
  var b;
  goog.userAgent.IE ? b = "-ms-transform" : goog.userAgent.WEBKIT ? b = "-webkit-transform" : goog.userAgent.OPERA ? b = "-o-transform" : goog.userAgent.GECKO && (b = "-moz-transform");
  var c;
  b && (c = goog.style.getStyle_(a, b));
  c || (c = goog.style.getStyle_(a, "transform"));
  return c ? (a = c.match(goog.style.MATRIX_TRANSLATION_REGEX_)) ? new goog.math.Coordinate(parseFloat(a[1]), parseFloat(a[2])) : new goog.math.Coordinate(0, 0) : new goog.math.Coordinate(0, 0);
};
crate.compiler = {};
crate.compiler.xmlns = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "xhtml", "xhtml", 1127939989), "http://www.w3.org/1999/xhtml", new cljs.core.Keyword(null, "svg", "svg", 1014018518), "http://www.w3.org/2000/svg"], null);
crate.compiler.group_id = cljs.core.atom.call(null, 0);
crate.compiler.bindings = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
crate.compiler.capture_binding = function(a, b) {
  return cljs.core.swap_BANG_.call(null, crate.compiler.bindings, cljs.core.conj, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b], null));
};
crate.compiler.Element = function() {
  return{};
}();
crate.compiler._elem = function(a) {
  if (a ? a.crate$compiler$Element$_elem$arity$1 : a) {
    return a.crate$compiler$Element$_elem$arity$1(a);
  }
  var b;
  b = crate.compiler._elem[goog.typeOf(null == a ? null : a)];
  if (!b && (b = crate.compiler._elem._, !b)) {
    throw cljs.core.missing_protocol.call(null, "Element.-elem", a);
  }
  return b.call(null, a);
};
crate.compiler.as_content = function as_content(b, c) {
  for (var d = cljs.core.seq.call(null, c), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k;
      if (function() {
        var b = h;
        return b ? cljs.core.truth_(cljs.core.truth_(null) ? null : b.crate$compiler$Element$) ? !0 : b.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, crate.compiler.Element, b) : cljs.core.native_satisfies_QMARK_.call(null, crate.compiler.Element, b);
      }()) {
        k = crate.compiler._elem.call(null, h);
      } else {
        if (null == h) {
          k = null;
        } else {
          if (cljs.core.map_QMARK_.call(null, h)) {
            throw "Maps cannot be used as content";
          }
          "string" === typeof h ? k = goog.dom.createTextNode(h) : cljs.core.vector_QMARK_.call(null, h) ? k = crate.compiler.elem_factory.call(null, h) : cljs.core.seq_QMARK_.call(null, h) ? k = as_content.call(null, b, h) : crate.binding.binding_coll_QMARK_.call(null, h) ? (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "coll", "coll", 1016963678), h), k = as_content.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [crate.binding.value.call(null, 
          h)], null))) : crate.binding.binding_QMARK_.call(null, h) ? (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "text", "text", 1017460895), h), k = as_content.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [crate.binding.value.call(null, h)], null))) : k = cljs.core.truth_(h.nodeName) ? h : cljs.core.truth_(h.get) ? h.get(0) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? goog.dom.createTextNode("" + cljs.core.str(h)) : 
          null;
        }
      }
      cljs.core.truth_(k) && goog.dom.appendChild(b, k);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
          f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f);
        } else {
          h = cljs.core.first.call(null, d);
          if (function() {
            var b = h;
            return b ? cljs.core.truth_(cljs.core.truth_(null) ? null : b.crate$compiler$Element$) ? !0 : b.cljs$lang$protocol_mask$partition$ ? !1 : cljs.core.native_satisfies_QMARK_.call(null, crate.compiler.Element, b) : cljs.core.native_satisfies_QMARK_.call(null, crate.compiler.Element, b);
          }()) {
            e = crate.compiler._elem.call(null, h);
          } else {
            if (null == h) {
              e = null;
            } else {
              if (cljs.core.map_QMARK_.call(null, h)) {
                throw "Maps cannot be used as content";
              }
              "string" === typeof h ? e = goog.dom.createTextNode(h) : cljs.core.vector_QMARK_.call(null, h) ? e = crate.compiler.elem_factory.call(null, h) : cljs.core.seq_QMARK_.call(null, h) ? e = as_content.call(null, b, h) : crate.binding.binding_coll_QMARK_.call(null, h) ? (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "coll", "coll", 1016963678), h), e = as_content.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [crate.binding.value.call(null, 
              h)], null))) : crate.binding.binding_QMARK_.call(null, h) ? (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "text", "text", 1017460895), h), e = as_content.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [crate.binding.value.call(null, h)], null))) : e = cljs.core.truth_(h.nodeName) ? h : cljs.core.truth_(h.get) ? h.get(0) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? goog.dom.createTextNode("" + cljs.core.str(h)) : 
              null;
            }
          }
          cljs.core.truth_(e) && goog.dom.appendChild(b, e);
          d = cljs.core.next.call(null, d);
          e = null;
          f = 0;
        }
        g = 0;
      } else {
        return null;
      }
    }
  }
};
crate.compiler.dom_binding = function() {
  var a = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), c = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), d = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), e = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "hierarchy", "hierarchy", 3129050535), cljs.core.get_global_hierarchy.call(null));
  return new cljs.core.MultiFn("dom-binding", function(a, b, c) {
    return a;
  }, new cljs.core.Keyword(null, "default", "default", 2558708147), e, a, b, c, d);
}();
cljs.core._add_method.call(null, crate.compiler.dom_binding, new cljs.core.Keyword(null, "text", "text", 1017460895), function(a, b, c) {
  return crate.binding.on_change.call(null, b, function(a) {
    goog.dom.removeChildren(c);
    return crate.compiler.as_content.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null));
  });
});
cljs.core._add_method.call(null, crate.compiler.dom_binding, new cljs.core.Keyword(null, "attr", "attr", 1016909155), function(a, b, c) {
  var d = cljs.core.nth.call(null, b, 0, null);
  a = cljs.core.nth.call(null, b, 1, null);
  return crate.binding.on_change.call(null, a, function(a) {
    return crate.compiler.dom_attr.call(null, c, d, a);
  });
});
cljs.core._add_method.call(null, crate.compiler.dom_binding, new cljs.core.Keyword(null, "style", "style", 1123684643), function(a, b, c) {
  var d = cljs.core.nth.call(null, b, 0, null);
  a = cljs.core.nth.call(null, b, 1, null);
  return crate.binding.on_change.call(null, a, function(a) {
    return cljs.core.truth_(d) ? crate.compiler.dom_style.call(null, c, d, a) : crate.compiler.dom_style.call(null, c, a);
  });
});
crate.compiler.dom_add = function(a, b, c, d) {
  a = crate.binding.opt.call(null, a, new cljs.core.Keyword(null, "add", "add", 1014000659));
  return cljs.core.truth_(a) ? a.call(null, b, c, d) : goog.dom.appendChild(b, c);
};
crate.compiler.dom_remove = function(a, b) {
  var c = crate.binding.opt.call(null, a, new cljs.core.Keyword(null, "remove", "remove", 4374260726));
  return cljs.core.truth_(c) ? c.call(null, b) : goog.dom.removeNode(b);
};
cljs.core._add_method.call(null, crate.compiler.dom_binding, new cljs.core.Keyword(null, "coll", "coll", 1016963678), function(a, b, c) {
  return crate.binding.on_change.call(null, b, function(a, e, f) {
    var g = cljs.core._EQ_;
    if (cljs.core.truth_(g.call(null, new cljs.core.Keyword(null, "add", "add", 1014000659), a))) {
      return crate.compiler.dom_add.call(null, b, c, e, f);
    }
    if (cljs.core.truth_(g.call(null, new cljs.core.Keyword(null, "remove", "remove", 4374260726), a))) {
      return crate.compiler.dom_remove.call(null, b, e);
    }
    throw Error([cljs.core.str("No matching clause: "), cljs.core.str(a)].join(""));
  });
});
crate.compiler.handle_bindings = function(a, b) {
  for (var c = cljs.core.seq.call(null, a), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      crate.compiler.dom_binding.call(null, h, g, b);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, c), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), crate.compiler.dom_binding.call(null, h, g, b), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
crate.compiler.dom_style = function() {
  var a = null, b = function(b, c) {
    if ("string" === typeof c) {
      b.setAttribute("style", c);
    } else {
      if (cljs.core.map_QMARK_.call(null, c)) {
        for (var f = cljs.core.seq.call(null, c), g = null, h = 0, k = 0;;) {
          if (k < h) {
            var l = cljs.core._nth.call(null, g, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null);
            a.call(null, b, m, l);
            k += 1;
          } else {
            if (f = cljs.core.seq.call(null, f)) {
              cljs.core.chunked_seq_QMARK_.call(null, f) ? (h = cljs.core.chunk_first.call(null, f), f = cljs.core.chunk_rest.call(null, f), g = h, h = cljs.core.count.call(null, h)) : (h = cljs.core.first.call(null, f), g = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), a.call(null, b, g, h), f = cljs.core.next.call(null, f), g = null, h = 0), k = 0;
            } else {
              break;
            }
          }
        }
      } else {
        crate.binding.binding_QMARK_.call(null, c) && (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, c], null)), a.call(null, b, crate.binding.value.call(null, c)));
      }
    }
    return b;
  }, c = function(a, b, c) {
    crate.binding.binding_QMARK_.call(null, c) && (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, c], null)), c = crate.binding.value.call(null, c));
    return goog.style.setStyle(a, cljs.core.name.call(null, b), c);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
crate.compiler.dom_attr = function() {
  var a = null, b = function(b, c) {
    if (cljs.core.truth_(b)) {
      if (cljs.core.map_QMARK_.call(null, c)) {
        for (var f = cljs.core.seq.call(null, c), g = null, h = 0, k = 0;;) {
          if (k < h) {
            var l = cljs.core._nth.call(null, g, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null);
            a.call(null, b, m, l);
            k += 1;
          } else {
            if (f = cljs.core.seq.call(null, f)) {
              cljs.core.chunked_seq_QMARK_.call(null, f) ? (h = cljs.core.chunk_first.call(null, f), f = cljs.core.chunk_rest.call(null, f), g = h, h = cljs.core.count.call(null, h)) : (h = cljs.core.first.call(null, f), g = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), a.call(null, b, g, h), f = cljs.core.next.call(null, f), g = null, h = 0), k = 0;
            } else {
              break;
            }
          }
        }
        return b;
      }
      return b.getAttribute(cljs.core.name.call(null, c));
    }
    return null;
  }, c = function(a, b, c) {
    cljs.core._EQ_.call(null, b, new cljs.core.Keyword(null, "style", "style", 1123684643)) ? crate.compiler.dom_style.call(null, a, c) : (crate.binding.binding_QMARK_.call(null, c) && (crate.compiler.capture_binding.call(null, new cljs.core.Keyword(null, "attr", "attr", 1016909155), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, c], null)), c = crate.binding.value.call(null, c)), a.setAttribute(cljs.core.name.call(null, b), c));
    return a;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
crate.compiler.re_tag = /([^\s\.#]+)(?:#([^\s\.#]+))?(?:\.([^\s#]+))?/;
crate.compiler.normalize_map_attrs = function(a) {
  return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, function(a) {
    var c = cljs.core.nth.call(null, a, 0, null);
    a = cljs.core.nth.call(null, a, 1, null);
    return!0 === a ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.name.call(null, c)], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, a], null);
  }, cljs.core.filter.call(null, cljs.core.comp.call(null, cljs.core.boolean$, cljs.core.second), a)));
};
crate.compiler.normalize_element = function(a) {
  var b = cljs.core.nth.call(null, a, 0, null);
  a = cljs.core.nthnext.call(null, a, 1);
  if (!(b instanceof cljs.core.Keyword || b instanceof cljs.core.Symbol || "string" === typeof b)) {
    throw[cljs.core.str(b), cljs.core.str(" is not a valid tag name.")].join("");
  }
  var c = cljs.core.re_matches.call(null, crate.compiler.re_tag, cljs.core.name.call(null, b)), d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null), f = cljs.core.nth.call(null, c, 2, null), g = cljs.core.nth.call(null, c, 3, null), h = function() {
    var a = clojure.string.split.call(null, e, /:/), b = cljs.core.nth.call(null, a, 0, null), a = cljs.core.nth.call(null, a, 1, null), c = crate.compiler.xmlns.call(null, cljs.core.keyword.call(null, b));
    if (cljs.core.truth_(a)) {
      var d = cljs.core.PersistentVector, f = cljs.core.PersistentVector.EMPTY_NODE;
      b = cljs.core.truth_(c) ? c : b;
      return new d(null, 2, 5, f, [b, a], null);
    }
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "xhtml", "xhtml", 1127939989)).cljs$core$IFn$_invoke$arity$1(crate.compiler.xmlns), b], null);
  }(), b = cljs.core.nth.call(null, h, 0, null), k = cljs.core.nth.call(null, h, 1, null), c = cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.filter.call(null, function(a, b, c, d, e, f, g, h) {
    return function(a) {
      return null != cljs.core.second.call(null, a);
    };
  }(c, d, e, f, g, h, b, k), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "id", "id", 1013907597), cljs.core.truth_(f) ? f : null, new cljs.core.Keyword(null, "class", "class", 1108647146), cljs.core.truth_(g) ? clojure.string.replace.call(null, g, /\./, " ") : null], null))), d = cljs.core.first.call(null, a);
  return cljs.core.map_QMARK_.call(null, d) ? new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, k, cljs.core.merge.call(null, c, crate.compiler.normalize_map_attrs.call(null, d)), cljs.core.next.call(null, a)], null) : new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, k, c, a], null);
};
crate.compiler.parse_content = function(a, b) {
  var c = cljs.core.first.call(null, b);
  return cljs.core.map_QMARK_.call(null, c) ? (crate.compiler.dom_attr.call(null, a, c), cljs.core.rest.call(null, b)) : b;
};
crate.compiler.create_elem = cljs.core.truth_(document.createElementNS) ? function(a, b) {
  return document.createElementNS(a, b);
} : function(a, b) {
  return document.createElement(b);
};
crate.compiler.elem_factory = function(a) {
  var b = crate.compiler.bindings;
  try {
    crate.compiler.bindings = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
    var c = crate.compiler.normalize_element.call(null, a), d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null), f = cljs.core.nth.call(null, c, 2, null), g = cljs.core.nth.call(null, c, 3, null), h = crate.compiler.create_elem.call(null, d, e);
    crate.compiler.dom_attr.call(null, h, f);
    crate.compiler.as_content.call(null, h, g);
    crate.compiler.handle_bindings.call(null, cljs.core.deref.call(null, crate.compiler.bindings), h);
    return h;
  } finally {
    crate.compiler.bindings = b;
  }
};
crate.compiler.add_optional_attrs = function(a) {
  return function() {
    var b = function(b) {
      if (cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, b))) {
        var c = cljs.core.apply.call(null, a, cljs.core.rest.call(null, b)), f = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nthnext.call(null, c, 1);
        return cljs.core.map_QMARK_.call(null, cljs.core.first.call(null, c)) ? cljs.core.apply.call(null, cljs.core.vector, f, cljs.core.merge.call(null, cljs.core.first.call(null, c), cljs.core.first.call(null, b)), cljs.core.rest.call(null, c)) : cljs.core.apply.call(null, cljs.core.vector, f, cljs.core.first.call(null, b), c);
      }
      return cljs.core.apply.call(null, a, b);
    }, c = function(a) {
      var c = null;
      0 < arguments.length && (c = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return b.call(this, c);
    };
    c.cljs$lang$maxFixedArity = 0;
    c.cljs$lang$applyTo = function(a) {
      a = cljs.core.seq(a);
      return b(a);
    };
    c.cljs$core$IFn$_invoke$arity$variadic = b;
    return c;
  }();
};
crate.core = {};
crate.core.group_id = cljs.core.atom.call(null, 0);
crate.core.raw = function(a) {
  return goog.dom.htmlToDocumentFragment(a);
};
crate.core.html = function() {
  var a = function(a) {
    a = cljs.core.map.call(null, crate.compiler.elem_factory, a);
    return cljs.core.truth_(cljs.core.second.call(null, a)) ? a : cljs.core.first.call(null, a);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
crate.core.h = crate.util.escape_html;
lt.object = {};
lt.object.obj_id = cljs.core.atom.call(null, 0);
lt.object.instances = cljs.core.atom.call(null, cljs.core.sorted_map.call(null));
lt.object.behaviors = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.object.object_defs = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.object.tags = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.object.negated_tags = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.object._STAR_behavior_meta_STAR_ = null;
lt.object.add = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.object.object_defs, cljs.core.assoc, (new cljs.core.Keyword("lt.object", "type", "lt.object/type", 701613666)).cljs$core$IFn$_invoke$arity$1(a), a);
};
lt.object.add_behavior = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.object.behaviors, cljs.core.assoc, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), a);
};
lt.object.__GT_id = function(a) {
  return crate.binding.deref_QMARK_.call(null, a) ? (new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : (new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105)).cljs$core$IFn$_invoke$arity$1(a);
};
lt.object.__GT_behavior_name = function(a) {
  return cljs.core.coll_QMARK_.call(null, a) ? cljs.core.first.call(null, a) : a;
};
lt.object.__GT_behavior = function(a) {
  return cljs.core.deref.call(null, lt.object.behaviors).call(null, lt.object.__GT_behavior_name.call(null, a));
};
lt.object.__GT_triggers = function(a) {
  var b = cljs.core.atom.call(null, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY));
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      for (var f = cljs.core._nth.call(null, c, e), g = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "triggers", "triggers", 2516997421)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, f))), h = null, k = 0, l = 0;;) {
        if (l < k) {
          var m = cljs.core._nth.call(null, h, l);
          cljs.core.swap_BANG_.call(null, b, cljs.core.assoc_BANG_, m, cljs.core.conj.call(null, function() {
            var a = cljs.core.get.call(null, cljs.core.deref.call(null, b), m);
            return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY;
          }(), f));
          l += 1;
        } else {
          if (g = cljs.core.seq.call(null, g)) {
            h = g;
            if (cljs.core.chunked_seq_QMARK_.call(null, h)) {
              g = cljs.core.chunk_first.call(null, h), l = cljs.core.chunk_rest.call(null, h), h = g, k = cljs.core.count.call(null, g), g = l;
            } else {
              var n = cljs.core.first.call(null, h);
              cljs.core.swap_BANG_.call(null, b, cljs.core.assoc_BANG_, n, cljs.core.conj.call(null, function() {
                var a = cljs.core.get.call(null, cljs.core.deref.call(null, b), n);
                return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY;
              }(), f));
              g = cljs.core.next.call(null, h);
              h = null;
              k = 0;
            }
            l = 0;
          } else {
            break;
          }
        }
      }
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
          d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), c = d, d = cljs.core.count.call(null, d);
        } else {
          c = cljs.core.first.call(null, a);
          d = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "triggers", "triggers", 2516997421)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, c)));
          e = null;
          for (g = f = 0;;) {
            if (g < f) {
              var p = cljs.core._nth.call(null, e, g);
              cljs.core.swap_BANG_.call(null, b, cljs.core.assoc_BANG_, p, cljs.core.conj.call(null, function() {
                var a = cljs.core.get.call(null, cljs.core.deref.call(null, b), p);
                return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY;
              }(), c));
              g += 1;
            } else {
              if (d = cljs.core.seq.call(null, d)) {
                e = d;
                if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
                  d = cljs.core.chunk_first.call(null, e), g = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = g;
                } else {
                  var q = cljs.core.first.call(null, e);
                  cljs.core.swap_BANG_.call(null, b, cljs.core.assoc_BANG_, q, cljs.core.conj.call(null, function() {
                    var a = cljs.core.get.call(null, cljs.core.deref.call(null, b), q);
                    return cljs.core.truth_(a) ? a : cljs.core.PersistentVector.EMPTY;
                  }(), c));
                  d = cljs.core.next.call(null, e);
                  e = null;
                  f = 0;
                }
                g = 0;
              } else {
                break;
              }
            }
          }
          a = cljs.core.next.call(null, a);
          c = null;
          d = 0;
        }
        e = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.persistent_BANG_.call(null, cljs.core.deref.call(null, b));
};
lt.object.specificity_sort = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    for (var c = [], g = cljs.core.seq.call(null, a), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l);
        c.push([("" + cljs.core.str(m)).split(".").length, "" + cljs.core.str(m), m]);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          h = g, cljs.core.chunked_seq_QMARK_.call(null, h) ? (g = cljs.core.chunk_first.call(null, h), l = cljs.core.chunk_rest.call(null, h), h = g, k = cljs.core.count.call(null, g), g = l) : (g = cljs.core.first.call(null, h), c.push([("" + cljs.core.str(g)).split(".").length, "" + cljs.core.str(g), g]), g = cljs.core.next.call(null, h), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    c.sort();
    cljs.core.truth_(b) || c.reverse();
    for (g = 0;;) {
      if (g < c.length) {
        c[g] = c[g][2], g += 1;
      } else {
        break;
      }
    }
    return c;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.object.ts__GT_negations = function(a) {
  var b;
  b = {};
  a = cljs.core.seq.call(null, cljs.core.apply.call(null, cljs.core.concat, cljs.core.map.call(null, cljs.core.deref.call(null, lt.object.negated_tags), a)));
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      b[lt.object.__GT_behavior_name.call(null, f)] = !0;
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), b[lt.object.__GT_behavior_name.call(null, a)] = !0, a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.tags__GT_behaviors = function(a) {
  var b = cljs.core.apply.call(null, cljs.core.concat, cljs.core.map.call(null, cljs.core.deref.call(null, lt.object.tags), lt.object.specificity_sort.call(null, a)));
  a = cljs.core.reduce.call(null, function(a) {
    return function(a, b) {
      if (!cljs.core.truth_((new cljs.core.Keyword(null, "seen", "seen", 1017430509)).cljs$core$IFn$_invoke$arity$1(a)[lt.object.__GT_behavior_name.call(null, b)])) {
        var c = lt.object.__GT_behavior.call(null, b);
        if (cljs.core.truth_((new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3)).cljs$core$IFn$_invoke$arity$1(c))) {
          if (cljs.core.coll_QMARK_.call(null, (new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3)).cljs$core$IFn$_invoke$arity$1(c))) {
            for (var c = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3)).cljs$core$IFn$_invoke$arity$1(c)), g = null, h = 0, k = 0;;) {
              if (k < h) {
                var l = cljs.core._nth.call(null, g, k);
                (new cljs.core.Keyword(null, "seen", "seen", 1017430509)).cljs$core$IFn$_invoke$arity$1(a)[l] = !0;
                k += 1;
              } else {
                if (c = cljs.core.seq.call(null, c)) {
                  g = c, cljs.core.chunked_seq_QMARK_.call(null, g) ? (c = cljs.core.chunk_first.call(null, g), k = cljs.core.chunk_rest.call(null, g), g = c, h = cljs.core.count.call(null, c), c = k) : (c = cljs.core.first.call(null, g), (new cljs.core.Keyword(null, "seen", "seen", 1017430509)).cljs$core$IFn$_invoke$arity$1(a)[c] = !0, c = cljs.core.next.call(null, g), g = null, h = 0), k = 0;
                } else {
                  break;
                }
              }
            }
          }
          (new cljs.core.Keyword(null, "seen", "seen", 1017430509)).cljs$core$IFn$_invoke$arity$1(a)[lt.object.__GT_behavior_name.call(null, b)] = !0;
        }
        cljs.core.conj_BANG_.call(null, (new cljs.core.Keyword(null, "final", "final", 1111340264)).cljs$core$IFn$_invoke$arity$1(a), b);
      }
      return a;
    };
  }(b), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "seen", "seen", 1017430509), lt.object.ts__GT_negations.call(null, a), new cljs.core.Keyword(null, "final", "final", 1111340264), cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY)], null), b);
  return cljs.core.reverse.call(null, cljs.core.persistent_BANG_.call(null, (new cljs.core.Keyword(null, "final", "final", 1111340264)).cljs$core$IFn$_invoke$arity$1(a)));
};
lt.object.trigger__GT_behaviors = function(a, b) {
  return cljs.core.get.call(null, lt.object.__GT_triggers.call(null, lt.object.tags__GT_behaviors.call(null, b)), a);
};
lt.object.safe_report_error = function(a) {
  return cljs.core.truth_(lt.objs.console) ? lt.objs.console.error(a) : console.error("string" === typeof a ? a : a.stack);
};
lt.object.raise_STAR_ = function() {
  var a = null, b = function(b, c, f) {
    return a.call(null, b, c, f, null);
  }, c = function(a, b, c, g) {
    b = cljs.core.seq.call(null, b);
    for (var h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), n = (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, m)), p = cljs.core.coll_QMARK_.call(null, m) ? cljs.core.concat.call(null, cljs.core.rest.call(null, m), c) : c, q = cljs.core.coll_QMARK_.call(null, m) ? cljs.core.meta.call(null, m) : cljs.core.PersistentArrayMap.EMPTY;
        if (cljs.core.truth_(n)) {
          try {
            var r = (new Date).getTime(), s = lt.object._STAR_behavior_meta_STAR_;
            try {
              lt.object._STAR_behavior_meta_STAR_ = q, cljs.core.apply.call(null, n, a, p);
            } finally {
              lt.object._STAR_behavior_meta_STAR_ = s;
            }
            cljs.core._EQ_.call(null, g, new cljs.core.Keyword(null, "object.behavior.time", "object.behavior.time", 854340588)) || lt.object.raise.call(null, a, new cljs.core.Keyword(null, "object.behavior.time", "object.behavior.time", 854340588), m, (new Date).getTime() - r, g);
          } catch (t) {
            n = t, lt.object.safe_report_error.call(null, [cljs.core.str("Invalid behavior: "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, m)))].join("")), lt.object.safe_report_error.call(null, n);
          }
        }
        l += 1;
      } else {
        if (b = cljs.core.seq.call(null, b)) {
          if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
            h = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), m = h, k = cljs.core.count.call(null, h), h = m;
          } else {
            m = cljs.core.first.call(null, b);
            n = (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, m));
            p = cljs.core.coll_QMARK_.call(null, m) ? cljs.core.concat.call(null, cljs.core.rest.call(null, m), c) : c;
            q = cljs.core.coll_QMARK_.call(null, m) ? cljs.core.meta.call(null, m) : cljs.core.PersistentArrayMap.EMPTY;
            if (cljs.core.truth_(n)) {
              try {
                var v = (new Date).getTime(), u = lt.object._STAR_behavior_meta_STAR_;
                try {
                  lt.object._STAR_behavior_meta_STAR_ = q, cljs.core.apply.call(null, n, a, p);
                } finally {
                  lt.object._STAR_behavior_meta_STAR_ = u;
                }
                cljs.core._EQ_.call(null, g, new cljs.core.Keyword(null, "object.behavior.time", "object.behavior.time", 854340588)) || lt.object.raise.call(null, a, new cljs.core.Keyword(null, "object.behavior.time", "object.behavior.time", 854340588), m, (new Date).getTime() - v, g);
              } catch (w) {
                h = w, lt.object.safe_report_error.call(null, [cljs.core.str("Invalid behavior: "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, m)))].join("")), lt.object.safe_report_error.call(null, h);
              }
            }
            b = cljs.core.next.call(null, b);
            h = null;
            k = 0;
          }
          l = 0;
        } else {
          return null;
        }
      }
    }
  }, a = function(a, e, f, g) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 4:
        return c.call(this, a, e, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  return a;
}();
lt.object.raise = function() {
  var a = function(a, b, e) {
    var f = b.call(null, (new cljs.core.Keyword(null, "listeners", "listeners", 4090152369)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    return lt.object.raise_STAR_.call(null, a, f, e, b);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.call_behavior_reaction = function() {
  var a = function(a, b) {
    var e = (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, a));
    if (!cljs.core.truth_(e)) {
      throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, new cljs.core.Symbol(null, "behavior-fn", "behavior-fn", -1300659236, null)))].join(""));
    }
    return cljs.core.apply.call(null, e, b);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.update_listeners = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c = cljs.core.deref.call(null, a), c = cljs.core.set.call(null, cljs.core.concat.call(null, (new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(c), lt.object.tags__GT_behaviors.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(c)))), g = lt.object.__GT_triggers.call(null, c);
    cljs.core.truth_((new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875)).cljs$core$IFn$_invoke$arity$1(g)) ? (lt.object.raise_STAR_.call(null, a, (new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875)).cljs$core$IFn$_invoke$arity$1(g), null, new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875)), c = lt.object.__GT_triggers.call(null, c)) : c = g;
    c = cljs.core.truth_(b) ? c : cljs.core.dissoc.call(null, c, new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875));
    return cljs.core.assoc.call(null, cljs.core.deref.call(null, a), new cljs.core.Keyword(null, "listeners", "listeners", 4090152369), c);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.object.make_object_STAR_ = function() {
  var a = function(a, b) {
    return cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "tags", "tags", 1017456523), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "listeners", "listeners", 4090152369), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword("lt.object", 
    "type", "lt.object/type", 701613666), a, new cljs.core.Keyword(null, "children", "children", 2673430897), cljs.core.PersistentArrayMap.EMPTY], null), cljs.core.apply.call(null, cljs.core.hash_map, b));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.store_object_STAR_ = function(a) {
  lt.object.add.call(null, a);
  return a;
};
lt.object.instances_by_type = function(a) {
  return cljs.core.filter.call(null, function(b) {
    return cljs.core._EQ_.call(null, a, (new cljs.core.Keyword("lt.object", "type", "lt.object/type", 701613666)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances)));
};
lt.object.merge_BANG_ = function(a, b) {
  if (cljs.core.truth_(cljs.core.truth_(b) ? !cljs.core.map_QMARK_.call(null, b) : b)) {
    throw Error([cljs.core.str("Merge requires a map: "), cljs.core.str(b)].join(""));
  }
  return cljs.core.swap_BANG_.call(null, a, cljs.core.merge, b);
};
lt.object.handle_redef = function(a) {
  for (var b = (new cljs.core.Keyword("lt.object", "type", "lt.object/type", 701613666)).cljs$core$IFn$_invoke$arity$1(a), c = cljs.core.seq.call(null, lt.object.instances_by_type.call(null, b)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), g = cljs.core.deref.call(null, g), h = (new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(g), k = (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(g), l = cljs.core.set.call(null, (new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(g)), m = cljs.core.deref.call(null, lt.object.instances).call(null, lt.object.__GT_id.call(null, 
      g)), h = cljs.core.truth_((new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(a)) ? cljs.core.apply.call(null, (new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(a), m, h) : null, n = cljs.core.vector_QMARK_.call(null, h) ? crate.core.html.call(null, h) : h;
      lt.object.merge_BANG_.call(null, m, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "tags", "tags", 1017456523), clojure.set.union.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(g), (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(a)), new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), clojure.set.union.call(null, l, cljs.core.set.call(null, (new cljs.core.Keyword(null, 
      "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(a))), new cljs.core.Keyword(null, "content", "content", 1965434859), n], null));
      lt.object.merge_BANG_.call(null, m, lt.object.update_listeners.call(null, m));
      cljs.core.truth_(function() {
        var a = k;
        return cljs.core.truth_(a) ? n : a;
      }()) && lt.util.dom.replace_with.call(null, k, n);
      lt.object.raise.call(null, m, new cljs.core.Keyword(null, "redef", "redef", 1122293860));
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
          e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e);
        } else {
          var d = cljs.core.first.call(null, c), d = cljs.core.deref.call(null, d), g = (new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(d), p = (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(d), e = cljs.core.set.call(null, (new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(d)), f = cljs.core.deref.call(null, lt.object.instances).call(null, lt.object.__GT_id.call(null, 
          d)), g = cljs.core.truth_((new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(a)) ? cljs.core.apply.call(null, (new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(a), f, g) : null, q = cljs.core.vector_QMARK_.call(null, g) ? crate.core.html.call(null, g) : g;
          lt.object.merge_BANG_.call(null, f, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "tags", "tags", 1017456523), clojure.set.union.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(d), (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(a)), new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), clojure.set.union.call(null, e, cljs.core.set.call(null, (new cljs.core.Keyword(null, 
          "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(a))), new cljs.core.Keyword(null, "content", "content", 1965434859), q], null));
          lt.object.merge_BANG_.call(null, f, lt.object.update_listeners.call(null, f));
          cljs.core.truth_(function() {
            var a = p;
            return cljs.core.truth_(a) ? q : a;
          }()) && lt.util.dom.replace_with.call(null, p, q);
          lt.object.raise.call(null, f, new cljs.core.Keyword(null, "redef", "redef", 1122293860));
          c = cljs.core.next.call(null, c);
          d = null;
          e = 0;
        }
        f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_ = function() {
  var a = function(a, b) {
    return lt.object.handle_redef.call(null, lt.object.store_object_STAR_.call(null, cljs.core.apply.call(null, lt.object.make_object_STAR_, a, b)));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.make_behavior_STAR_ = function() {
  var a = function(a, b) {
    return cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "name", "name", 1017277949), a], null), cljs.core.apply.call(null, cljs.core.hash_map, b));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.store_behavior_STAR_ = function(a) {
  lt.object.add_behavior.call(null, a);
  return(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a);
};
lt.object.wrap_throttle = function(a) {
  var b = (new cljs.core.Keyword(null, "throttle", "throttle", 2497347228)).cljs$core$IFn$_invoke$arity$1(a);
  return cljs.core.truth_(b) ? cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.util.js.throttle.call(null, b, (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(a))) : a;
};
lt.object.wrap_debounce = function(a) {
  var b = (new cljs.core.Keyword(null, "debounce", "debounce", 1556599227)).cljs$core$IFn$_invoke$arity$1(a);
  return cljs.core.truth_(b) ? cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.util.js.debounce.call(null, b, (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(a))) : a;
};
lt.object.behavior_STAR_ = function() {
  var a = function(a, b) {
    return lt.object.store_behavior_STAR_.call(null, lt.object.wrap_debounce.call(null, lt.object.wrap_throttle.call(null, cljs.core.apply.call(null, lt.object.make_behavior_STAR_, a, b))));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.raise_reduce = function() {
  var a = function(a, b, e, f) {
    b = b.call(null, (new cljs.core.Keyword(null, "listeners", "listeners", 4090152369)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    return cljs.core.reduce.call(null, function(b, d) {
      var e = (new cljs.core.Keyword(null, "reaction", "reaction", 4441361819)).cljs$core$IFn$_invoke$arity$1(lt.object.__GT_behavior.call(null, d)), l = cljs.core.coll_QMARK_.call(null, d) ? cljs.core.concat.call(null, cljs.core.rest.call(null, d), f) : f, m = cljs.core.coll_QMARK_.call(null, d) ? cljs.core.meta.call(null, d) : cljs.core.PersistentArrayMap.EMPTY;
      if (cljs.core.not.call(null, e)) {
        return b;
      }
      var n = lt.object._STAR_behavior_meta_STAR_;
      try {
        return lt.object._STAR_behavior_meta_STAR_ = m, cljs.core.apply.call(null, e, a, b, l);
      } finally {
        lt.object._STAR_behavior_meta_STAR_ = n;
      }
    }, e, b);
  }, b = function(b, d, e, f) {
    var g = null;
    3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
    return a.call(this, b, d, e, g);
  };
  b.cljs$lang$maxFixedArity = 3;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.next(b);
    var f = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, f, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.update_BANG_ = function() {
  var a = function(a, b) {
    return cljs.core.swap_BANG_.call(null, a, function(a) {
      return cljs.core.apply.call(null, cljs.core.update_in, a, b);
    });
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.assoc_in_BANG_ = function(a, b, c) {
  if (cljs.core.truth_(cljs.core.truth_(b) ? !cljs.core.sequential_QMARK_.call(null, b) : b)) {
    throw Error([cljs.core.str("Associate requires a sequence of keys: "), cljs.core.str(b)].join(""));
  }
  return cljs.core.swap_BANG_.call(null, a, function(a) {
    return cljs.core.assoc_in.call(null, a, b, c);
  });
};
lt.object.__GT_inst = function(a) {
  return cljs.core.map_QMARK_.call(null, a) ? cljs.core.deref.call(null, lt.object.instances).call(null, lt.object.__GT_id.call(null, a)) : crate.binding.deref_QMARK_.call(null, a) ? a : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.deref.call(null, lt.object.instances).call(null, a) : null;
};
lt.object.__GT_content = function(a) {
  return(new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
};
lt.object.destroy_BANG_ = function(a) {
  var b = lt.object.__GT_inst.call(null, a);
  return cljs.core.truth_(b) ? (lt.object.raise.call(null, b, new cljs.core.Keyword(null, "destroy", "destroy", 2571277164)), cljs.core.swap_BANG_.call(null, lt.object.instances, cljs.core.dissoc, lt.object.__GT_id.call(null, b)), cljs.core.truth_(lt.object.__GT_content.call(null, a)) && lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a)), cljs.core.reset_BANG_.call(null, a, null)) : null;
};
lt.object.store_inst = function(a) {
  cljs.core.swap_BANG_.call(null, lt.object.instances, cljs.core.assoc, (new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), a);
  return a;
};
lt.object.create = function() {
  var a = function(a, b) {
    var e = a instanceof cljs.core.Keyword ? cljs.core.deref.call(null, lt.object.object_defs).call(null, a) : a, f = function() {
      var a = (new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105)).cljs$core$IFn$_invoke$arity$1(e);
      return cljs.core.truth_(a) ? a : cljs.core.swap_BANG_.call(null, lt.object.obj_id, cljs.core.inc);
    }(), f = cljs.core.atom.call(null, cljs.core.assoc.call(null, cljs.core.dissoc.call(null, e, new cljs.core.Keyword(null, "init", "init", 1017141378)), new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105), f, new cljs.core.Keyword(null, "args", "args", 1016906831), b, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), cljs.core.set.call(null, (new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)).cljs$core$IFn$_invoke$arity$1(e)), new cljs.core.Keyword(null, 
    "tags", "tags", 1017456523), cljs.core.set.call(null, cljs.core.conj.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "object", "object", 4285503153))))), g = lt.object.store_inst.call(null, f);
    lt.object.merge_BANG_.call(null, g, lt.object.update_listeners.call(null, g));
    f = cljs.core.truth_((new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(e)) ? cljs.core.apply.call(null, (new cljs.core.Keyword(null, "init", "init", 1017141378)).cljs$core$IFn$_invoke$arity$1(e), g, b) : null;
    f = cljs.core.vector_QMARK_.call(null, f) ? crate.core.html.call(null, f) : f;
    lt.object.merge_BANG_.call(null, g, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "content", "content", 1965434859), f], null));
    cljs.core.add_watch.call(null, g, new cljs.core.Keyword("lt.object", "change", "lt.object/change", 2456955616), function(a, b, c, d) {
      return lt.object.raise.call(null, g, new cljs.core.Keyword(null, "object.change", "object.change", 966833329));
    });
    lt.object.raise_STAR_.call(null, g, lt.object.trigger__GT_behaviors.call(null, new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g))), null);
    lt.object.raise.call(null, g, new cljs.core.Keyword(null, "init", "init", 1017141378));
    return g;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.refresh_BANG_ = function(a) {
  cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, a));
  lt.object.raise_STAR_.call(null, a, lt.object.trigger__GT_behaviors.call(null, new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), null);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "object.refresh", "object.refresh", 4196174494));
};
lt.object.add_behavior_BANG_ = function(a, b) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)], null), cljs.core.conj, b);
  return cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, a));
};
lt.object.rem_behavior_BANG_ = function(a, b) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)], null), function(a) {
    return cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), a);
  });
  return cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, a));
};
lt.object.__GT_def = function(a) {
  return cljs.core.map_QMARK_.call(null, a) ? a : cljs.core.deref.call(null, lt.object.object_defs).call(null, a);
};
lt.object.by_id = function(a) {
  return cljs.core.truth_(a) ? cljs.core.deref.call(null, lt.object.instances).call(null, a) : null;
};
lt.object.by_tag = function(a) {
  return cljs.core.sort_by.call(null, cljs.core.comp.call(null, new cljs.core.Keyword("lt.object", "id", "lt.object/id", 706431105), cljs.core.deref), cljs.core.filter.call(null, function(b) {
    b = (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b));
    return cljs.core.truth_(b) ? b.call(null, a) : null;
  }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances))));
};
lt.object.in_tag_QMARK_ = function(a, b) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), cljs.core.deref.call(null, lt.object.tags).call(null, a)));
};
lt.object.has_tag_QMARK_ = function(a, b) {
  return(new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).call(null, b);
};
lt.object.add_tags = function(a, b) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tags", "tags", 1017456523)], null), function(a) {
    return cljs.core.reduce.call(null, cljs.core.conj, a, cljs.core.filter.call(null, cljs.core.identity, b));
  });
  cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, a));
  lt.object.raise.call(null, a, new cljs.core.Keyword("lt.object", "tags-added", "lt.object/tags-added", 1756253556), b);
  lt.object.raise_STAR_.call(null, a, lt.object.trigger__GT_behaviors.call(null, new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), b), null);
  return a;
};
lt.object.remove_tags = function(a, b) {
  var c = cljs.core.deref.call(null, a), d = cljs.core.apply.call(null, cljs.core.concat, cljs.core.map.call(null, cljs.core.deref.call(null, lt.object.tags), b)), c = cljs.core.update_in.call(null, cljs.core.update_in.call(null, cljs.core.update_in.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tags", "tags", 1017456523)], null), function(a, c) {
    return function(a) {
      return cljs.core.reduce.call(null, cljs.core.disj, a, b);
    };
  }(c, d)), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)], null), function(a, b) {
    return function(a) {
      return cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), a);
    };
  }(c, d)), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "listeners", "listeners", 4090152369)], null), function(a, c) {
    return function(a) {
      return cljs.core.apply.call(null, cljs.core.dissoc, a, b);
    };
  }(c, d));
  lt.object.merge_BANG_.call(null, a, c);
  cljs.core.reset_BANG_.call(null, a, lt.object.update_listeners.call(null, a));
  lt.object.raise.call(null, a, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), b);
  return a;
};
lt.object.tag_behaviors = function(a, b) {
  cljs.core.swap_BANG_.call(null, lt.object.tags, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null), function(a) {
    return cljs.core.reduce.call(null, cljs.core.conj, cljs.core.truth_(a) ? a : cljs.core.List.EMPTY, b);
  });
  for (var c = cljs.core.seq.call(null, lt.object.by_tag.call(null, a)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      lt.object.refresh_BANG_.call(null, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), f = cljs.core.chunk_rest.call(null, d), d = c, e = cljs.core.count.call(null, c), c = f) : (c = cljs.core.first.call(null, d), lt.object.refresh_BANG_.call(null, c), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.deref.call(null, lt.object.tags).call(null, a);
};
lt.object.remove_tag_behaviors = function(a, b) {
  cljs.core.swap_BANG_.call(null, lt.object.tags, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null), function(a) {
    return cljs.core.remove.call(null, cljs.core.set.call(null, b), cljs.core.truth_(a) ? a : cljs.core.List.EMPTY);
  });
  for (var c = cljs.core.seq.call(null, lt.object.by_tag.call(null, a)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      for (var g = cljs.core._nth.call(null, d, f), h = cljs.core.seq.call(null, b), k = null, l = 0, m = 0;;) {
        if (m < l) {
          var n = cljs.core._nth.call(null, k, m);
          lt.object.rem_behavior_BANG_.call(null, g, n);
          m += 1;
        } else {
          if (h = cljs.core.seq.call(null, h)) {
            k = h, cljs.core.chunked_seq_QMARK_.call(null, k) ? (h = cljs.core.chunk_first.call(null, k), m = cljs.core.chunk_rest.call(null, k), k = h, l = cljs.core.count.call(null, h), h = m) : (h = cljs.core.first.call(null, k), lt.object.rem_behavior_BANG_.call(null, g, h), h = cljs.core.next.call(null, k), k = null, l = 0), m = 0;
          } else {
            break;
          }
        }
      }
      f += 1;
    } else {
      if (g = cljs.core.seq.call(null, c)) {
        c = g;
        if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
          d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), g = d, e = cljs.core.count.call(null, d), d = g;
        } else {
          g = cljs.core.first.call(null, c);
          d = cljs.core.seq.call(null, b);
          e = null;
          for (h = f = 0;;) {
            if (h < f) {
              k = cljs.core._nth.call(null, e, h), lt.object.rem_behavior_BANG_.call(null, g, k), h += 1;
            } else {
              if (d = cljs.core.seq.call(null, d)) {
                e = d, cljs.core.chunked_seq_QMARK_.call(null, e) ? (d = cljs.core.chunk_first.call(null, e), h = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, e), lt.object.rem_behavior_BANG_.call(null, g, d), d = cljs.core.next.call(null, e), e = null, f = 0), h = 0;
              } else {
                break;
              }
            }
          }
          c = cljs.core.next.call(null, c);
          d = null;
          e = 0;
        }
        f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.__BEH__add_tag = function(a, b) {
  return cljs.core.truth_(b) ? lt.object.add_tags.call(null, a, cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.object", "add-tag", "lt.object/add-tag", 1703923742), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.object.__BEH__add_tag, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Add tag to object", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "tag"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.__BEH__remove_tag = function(a, b) {
  return cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, a, b)) ? lt.object.remove_tags.call(null, a, cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.object", "remove-tag", "lt.object/remove-tag", 3883925951), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.object.__BEH__remove_tag, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Remove tag from object", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "tag"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-added", "lt.object/tags-added", 1756253556), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.__BEH__shadow_tag = function(a, b, c) {
  var d = lt.object.has_tag_QMARK_.call(null, a, b), e = lt.object.has_tag_QMARK_.call(null, a, c);
  if (cljs.core.truth_(cljs.core.truth_(d) ? cljs.core.not.call(null, e) : d)) {
    return lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [c], null));
  }
  if (cljs.core.truth_(function() {
    var a = cljs.core.not.call(null, d);
    return a ? e : a;
  }())) {
    return lt.object.remove_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [c], null));
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.object", "shadow-tag", "lt.object/shadow-tag", 1731213395), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.object.__BEH__shadow_tag, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Shadow a tag on an object", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "tag to shadow"], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "tag to add"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-added", "lt.object/tags-added", 1756253556), 
null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.__BEH__report_time = function(a, b, c, d) {
  return cljs.core.truth_(lt.objs.console) ? lt.objs.console.log([cljs.core.str(b), cljs.core.str(" triggered by "), cljs.core.str(d), cljs.core.str(" took "), cljs.core.str(c), cljs.core.str("ms")].join("")) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.object", "report-time", "lt.object/report-time", 1387009782), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.object.__BEH__report_time, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.behavior.time", "object.behavior.time", 854340588), null], null), null));
lt.objs = {};
lt.objs.context = {};
lt.objs.context.contexts = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
lt.objs.context.groups = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.context.ctx__GT_obj = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.context.ctx__GT_group = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.context.group__GT_ctxs = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.context.append_group = function(a, b) {
  return cljs.core.swap_BANG_.call(null, lt.objs.context.groups, function(c) {
    return cljs.core.truth_(c.call(null, a)) ? cljs.core.update_in.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null), cljs.core.conj, b) : cljs.core.assoc.call(null, c, a, cljs.core.PersistentHashSet.fromArray([b], !0));
  });
};
lt.objs.context.in_QMARK_ = function(a) {
  return cljs.core.deref.call(null, lt.objs.context.contexts).call(null, a);
};
lt.objs.context.out_BANG_ = function() {
  var a = null, b = function(a) {
    var b = cljs.core.coll_QMARK_.call(null, a) ? a : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null);
    cljs.core.swap_BANG_.call(null, lt.objs.context.contexts, function(a) {
      return cljs.core.apply.call(null, cljs.core.disj, a, b);
    });
    cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_obj, function(a) {
      return cljs.core.apply.call(null, cljs.core.dissoc, a, b);
    });
    return lt.object.raise.call(null, lt.objs.context.ctx_obj, new cljs.core.Keyword(null, "log!", "log!", 1017231567));
  }, c = function(b, c) {
    return a.call(null, b);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.context.in_BANG_ = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.coll_QMARK_.call(null, a) ? a : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null);
    cljs.core.swap_BANG_.call(null, lt.objs.context.contexts, function(a) {
      return cljs.core.apply.call(null, cljs.core.conj, a, f);
    });
    cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_obj, function(a) {
      return cljs.core.merge.call(null, a, cljs.core.zipmap.call(null, f, cljs.core.repeat.call(null, e)));
    });
    lt.object.raise.call(null, lt.objs.context.ctx_obj, new cljs.core.Keyword(null, "log!", "log!", 1017231567));
    for (var g = cljs.core.seq.call(null, f), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), m = cljs.core.deref.call(null, lt.objs.context.group__GT_ctxs).call(null, cljs.core.deref.call(null, lt.objs.context.ctx__GT_group).call(null, m));
        cljs.core.truth_(m) && lt.objs.context.out_BANG_.call(null, m);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          cljs.core.chunked_seq_QMARK_.call(null, g) ? (k = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), h = k, k = cljs.core.count.call(null, k)) : (m = cljs.core.first.call(null, g), h = cljs.core.deref.call(null, lt.objs.context.group__GT_ctxs).call(null, cljs.core.deref.call(null, lt.objs.context.ctx__GT_group).call(null, m)), cljs.core.truth_(h) && lt.objs.context.out_BANG_.call(null, h), g = cljs.core.next.call(null, g), h = null, k = 0), l = 0;
        } else {
          return null;
        }
      }
    }
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.context.toggle_BANG_ = function() {
  var a = function(a, b) {
    for (var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.seq.call(null, a), g = null, h = 0, k = 0;;) {
      if (k < h) {
        var l = cljs.core._nth.call(null, g, k);
        cljs.core.truth_(lt.objs.context.in_QMARK_.call(null, l)) ? lt.objs.context.out_BANG_.call(null, l) : lt.objs.context.in_BANG_.call(null, l, e);
        k += 1;
      } else {
        if (f = cljs.core.seq.call(null, f)) {
          g = f, cljs.core.chunked_seq_QMARK_.call(null, g) ? (f = cljs.core.chunk_first.call(null, g), h = cljs.core.chunk_rest.call(null, g), g = f, l = cljs.core.count.call(null, f), f = h, h = l) : (l = cljs.core.first.call(null, g), cljs.core.truth_(lt.objs.context.in_QMARK_.call(null, l)) ? lt.objs.context.out_BANG_.call(null, l) : lt.objs.context.in_BANG_.call(null, l, e), f = cljs.core.next.call(null, g), g = null, h = 0), k = 0;
        } else {
          return null;
        }
      }
    }
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.context.current = function() {
  return cljs.core.deref.call(null, lt.objs.context.contexts);
};
lt.objs.context.group_BANG_ = function(a, b) {
  cljs.core.swap_BANG_.call(null, lt.objs.context.ctx__GT_group, cljs.core.assoc, a, b);
  return cljs.core.swap_BANG_.call(null, lt.objs.context.group__GT_ctxs, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), cljs.core.conj, a);
};
lt.objs.context.__GT_obj = function(a) {
  return cljs.core.deref.call(null, lt.objs.context.ctx__GT_obj).call(null, a);
};
lt.objs.context.enqueue = function(a, b, c) {
  return cljs.core._EQ_.call(null, c, cljs.core.count.call(null, b)) ? cljs.core.conj.call(null, cljs.core.pop.call(null, b), a) : cljs.core.conj.call(null, b, a);
};
lt.objs.context.__BEH__log = function(a) {
  var b = (new cljs.core.Keyword(null, "buffer-size", "buffer-size", 4237691104)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c = cljs.core.deref.call(null, lt.objs.context.contexts);
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "history", "history", 1940838406)], null), function(a) {
    return lt.objs.context.enqueue.call(null, c, a, b);
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.context", "log", "lt.objs.context/log", 4046231399), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.context.__BEH__log, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "log!", "log!", 1017231567), null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 
16);
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.context", "context", "lt.objs.context/context", 4461036756), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "context", "context", 1965435169), null], null), null), new cljs.core.Keyword(null, "history", "history", 1940838406), cljs.core.PersistentQueue.EMPTY, new cljs.core.Keyword(null, "buffer-size", "buffer-size", 
4237691104), 8, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return null;
});
lt.objs.context.ctx_obj = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.context", "context", "lt.objs.context/context", 4461036756));
lt.objs.canvas = {};
lt.objs.canvas.canvas_elem = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#canvas", "div#canvas", 1156573436)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.canvas", "canvas", "lt.objs.canvas/canvas", 4793027327), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.canvas.canvas_elem.call(null, a);
});
lt.objs.canvas.canvas = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.canvas", "canvas", "lt.objs.canvas/canvas", 4793027327));
lt.util.dom.append.call(null, lt.util.dom.$.call(null, "#wrapper"), lt.object.__GT_content.call(null, lt.objs.canvas.canvas));
lt.objs.canvas.add_BANG_ = function() {
  var a = function(a, b) {
    cljs.core.nth.call(null, b, 0, null);
    lt.util.dom.append.call(null, lt.object.__GT_content.call(null, lt.objs.canvas.canvas), lt.object.__GT_content.call(null, a));
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "show", "show", 1017433711));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.canvas.__BEH__append_canvas = function(a) {
  lt.util.dom.css.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#loader", "#loader", 914242920)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "opacity", "opacity", 4041665405), 0], null));
  return lt.util.dom.css.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#wrapper", "#wrapper", 3478231682)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "opacity", "opacity", 4041665405), 1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.canvas", "append-canvas", "lt.objs.canvas/append-canvas", 4118451466), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.canvas.__BEH__append_canvas, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.command = {};
lt.objs.command.required_keys = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "desc", "desc", 1016984067), null, new cljs.core.Keyword(null, "exec", "exec", 1017031683), null, new cljs.core.Keyword(null, "command", "command", 1964298941), null], null), null);
lt.objs.command.command = function(a) {
  if (!cljs.core.every_QMARK_.call(null, a, lt.objs.command.required_keys)) {
    throw Error([cljs.core.str("Assert failed: "), cljs.core.str([cljs.core.str("Command doesn't have required keys: "), cljs.core.str(lt.objs.command.required_keys)].join("")), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "every?", "every?", 1363110461, null), new cljs.core.Symbol(null, "cmd", "cmd", -1640432909, null), new cljs.core.Symbol(null, "required-keys", "required-keys", -626521829, null))))].join(""));
  }
  lt.object.update_BANG_.call(null, lt.objs.command.manager, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "commands", "commands", 4706336250)], null), cljs.core.assoc, (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a), a);
  cljs.core.truth_((new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(a)) && lt.object.add_tags.call(null, (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "command.options", "command.options", 1825500781)], null));
  return lt.object.raise.call(null, lt.objs.command.manager, new cljs.core.Keyword(null, "added", "added", 1106564210), a);
};
lt.objs.command.by_id = function(a) {
  return cljs.core.get.call(null, (new cljs.core.Keyword(null, "commands", "commands", 4706336250)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.command.manager)), cljs.core.map_QMARK_.call(null, a) ? (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a) : a);
};
lt.objs.command.completions = function(a) {
  return cljs.core.truth_(cljs.core.truth_(a) ? cljs.core._EQ_.call(null, cljs.core.subs.call(null, a, 0, 1), ":") : a) ? cljs.core.map.call(null, function(a) {
    return{text:"" + cljs.core.str((new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a)), completion:"" + cljs.core.str((new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a))};
  }, cljs.core.vals.call(null, (new cljs.core.Keyword(null, "commands", "commands", 4706336250)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.command.manager)))) : cljs.core.map.call(null, function(a) {
    return cljs.core.not.call(null, (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a)) ? {text:"" + cljs.core.str((new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a)), completion:"" + cljs.core.str((new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a))} : {text:(new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a), completion:"" + cljs.core.str((new cljs.core.Keyword(null, 
    "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a))};
  }, cljs.core.vals.call(null, (new cljs.core.Keyword(null, "commands", "commands", 4706336250)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.command.manager))));
};
lt.objs.command.exec_BANG_ = function() {
  var a = function(a, b) {
    var e = lt.objs.command.by_id.call(null, a);
    return cljs.core.truth_(cljs.core.truth_(e) ? (new cljs.core.Keyword(null, "exec", "exec", 1017031683)).cljs$core$IFn$_invoke$arity$1(e) : e) ? cljs.core.truth_((new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(e)) ? cljs.core.apply.call(null, lt.object.raise, cljs.core.first.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "sidebar.command", "sidebar.command", 3945910827))), new cljs.core.Keyword(null, "exec!", "exec!", 1110854946), 
    e, b) : cljs.core.apply.call(null, (new cljs.core.Keyword(null, "exec", "exec", 1017031683)).cljs$core$IFn$_invoke$arity$1(e), b) : null;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.command", "command.manager", "lt.objs.command/command.manager", 2567370622), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "command.manager", "command.manager", 3910236028), null], null), null), new cljs.core.Keyword(null, "commands", "commands", 4706336250), cljs.core.PersistentArrayMap.EMPTY);
lt.objs.command.manager = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.command", "command.manager", "lt.objs.command/command.manager", 2567370622));
lt.objs.animations = {};
lt.objs.animations.$body = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652));
lt.objs.animations.force_off = !1;
lt.objs.animations.on = function() {
  return cljs.core.truth_(lt.objs.animations.force_off) ? null : lt.util.dom.add_class.call(null, lt.objs.animations.$body, new cljs.core.Keyword(null, "animated", "animated", 4513668373));
};
lt.objs.animations.off = function() {
  return cljs.core.truth_(lt.objs.animations.force_off) ? null : lt.util.dom.remove_class.call(null, lt.objs.animations.$body, new cljs.core.Keyword(null, "animated", "animated", 4513668373));
};
lt.objs.animations.on_QMARK_ = function() {
  return cljs.core.truth_(lt.objs.animations.force_off) ? null : lt.util.dom.has_class_QMARK_.call(null, lt.objs.animations.$body, new cljs.core.Keyword(null, "animated", "animated", 4513668373));
};
lt.objs.animations.__BEH__animate_on_init = function(a) {
  return lt.objs.animations.on.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.animations", "animate-on-init", "lt.objs.animations/animate-on-init", 4259711187), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.animations.__BEH__animate_on_init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.animations.__BEH__toggle_animations = function(a, b) {
  lt.objs.animations.force_off = cljs.core.not.call(null, b);
  return cljs.core.truth_(b) ? lt.objs.animations.on.call(null) : lt.objs.animations.off.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.animations", "toggle-animations", "lt.objs.animations/toggle-animations", 1935503589), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.animations.__BEH__toggle_animations, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Enable or disable UI animations", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.platform = {};
lt.objs.platform.electron = !0;
lt.objs.platform.fs = require("fs");
lt.objs.platform.clipboard = require("clipboard");
lt.objs.platform.shell = require("shell");
lt.objs.platform.get_data_path = function() {
  return require("remote").require("app").getDataPath();
};
lt.objs.platform.normalize = function(a) {
  var b = cljs.core._EQ_;
  if (cljs.core.truth_(b.call(null, "win32", a))) {
    return new cljs.core.Keyword(null, "windows", "windows", 2363397621);
  }
  if (cljs.core.truth_(b.call(null, "linux", a))) {
    return new cljs.core.Keyword(null, "linux", "linux", 1116882022);
  }
  if (cljs.core.truth_(b.call(null, "darwin", a))) {
    return new cljs.core.Keyword(null, "mac", "mac", 1014012097);
  }
  throw Error([cljs.core.str("No matching clause: "), cljs.core.str(a)].join(""));
};
lt.objs.platform.open_url = function(a) {
  return lt.objs.platform.shell.openExternal(a);
};
lt.objs.platform.open = function(a) {
  return cljs.core.truth_(lt.objs.platform.fs.existsSync(a)) ? lt.objs.platform.shell.openItem(a) : lt.objs.platform.open_url.call(null, a);
};
lt.objs.platform.show_item = function(a) {
  return lt.objs.platform.shell.showItemInFolder(a);
};
lt.objs.platform.copy = function(a) {
  return lt.objs.platform.clipboard.writeText(a);
};
lt.objs.platform.paste = function() {
  return lt.objs.platform.clipboard.readText();
};
lt.objs.platform.platform = lt.objs.platform.normalize.call(null, process.platform);
lt.objs.platform.mac_QMARK_ = function() {
  return cljs.core._EQ_.call(null, lt.objs.platform.platform, new cljs.core.Keyword(null, "mac", "mac", 1014012097));
};
lt.objs.platform.win_QMARK_ = function() {
  return cljs.core._EQ_.call(null, lt.objs.platform.platform, new cljs.core.Keyword(null, "windows", "windows", 2363397621));
};
lt.objs.platform.linux_QMARK_ = function() {
  return cljs.core._EQ_.call(null, lt.objs.platform.platform, new cljs.core.Keyword(null, "linux", "linux", 1116882022));
};
lt.util.ipc = {};
lt.util.ipc.ipc = require("ipc");
lt.util.ipc.send = function() {
  var a = function(a, b) {
    return cljs.core.apply.call(null, lt.util.ipc.ipc.send, a, cljs.core.clj__GT_js.call(null, b));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.util.ipc.on = function(a, b) {
  return lt.util.ipc.ipc.on(a, b);
};
if (cljs.core.truth_(process.env.IPC_DEBUG)) {
  var old_send_14707 = lt.util.ipc.send, old_on_14708 = lt.util.ipc.on;
  lt.util.ipc.send = function() {
    var a = function(a) {
      cljs.core.prn.call(null, "RENDERER-\x3e", a);
      return cljs.core.apply.call(null, old_send_14707, a);
    }, b = function(b) {
      var d = null;
      0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
      return a.call(this, d);
    };
    b.cljs$lang$maxFixedArity = 0;
    b.cljs$lang$applyTo = function(b) {
      b = cljs.core.seq(b);
      return a(b);
    };
    b.cljs$core$IFn$_invoke$arity$variadic = a;
    return b;
  }();
  lt.util.ipc.on = function(a, b) {
    return old_on_14708.call(null, a, function() {
      var c = function(c) {
        cljs.core.prn.call(null, "-\x3eRENDERER", a, c);
        return cljs.core.apply.call(null, b, c);
      }, d = function(a) {
        var b = null;
        0 < arguments.length && (b = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
        return c.call(this, b);
      };
      d.cljs$lang$maxFixedArity = 0;
      d.cljs$lang$applyTo = function(a) {
        a = cljs.core.seq(a);
        return c(a);
      };
      d.cljs$core$IFn$_invoke$arity$variadic = c;
      return d;
    }());
  };
}
;lt.objs.app = {};
lt.objs.app.remote = require("remote");
lt.objs.app.win = lt.objs.app.remote.getCurrentWindow();
lt.objs.app.frame = require("web-frame");
lt.objs.app.closing = !0;
lt.objs.app.default_zoom = 1;
lt.objs.app.app_url = function() {
  return window.location.href;
};
lt.objs.app.window_number = function() {
  return lt.objs.app.win.id;
};
lt.objs.app.first_window_QMARK_ = function() {
  return cljs.core._EQ_.call(null, 1, lt.objs.app.window_number.call(null));
};
lt.objs.app.prevent_close = function() {
  return lt.objs.app.closing = !1;
};
lt.objs.app.close = function() {
  var a = null, b = function() {
    return a.call(null, !1);
  }, c = function(a) {
    return cljs.core.truth_(a) ? (lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "closing", "closing", 1880444967)), lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "closed", "closed", 3951351006)), lt.objs.app.win.destroy()) : lt.objs.app.win.close();
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.app.refresh = function() {
  return window.location.reload(!0);
};
lt.objs.app.init = function() {
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "deploy", "deploy", 3973538905));
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "pre-init", "pre-init", 3967677804));
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "init", "init", 1017141378));
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "post-init", "post-init", 2970371471));
  return lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "show", "show", 1017433711));
};
lt.objs.app.fetch = function(a) {
  a = localStorage[cljs.core.name.call(null, a)];
  return cljs.core.truth_(a) ? cljs.core.not_EQ_.call(null, "null", a) ? JSON.parse(a) : null : null;
};
lt.objs.app.store_BANG_ = function(a, b) {
  return localStorage[cljs.core.name.call(null, a)] = "string" === typeof b ? cljs.core.pr_str.call(null, b) : b;
};
lt.objs.app.store_swap_BANG_ = function(a, b) {
  var c = b.call(null, lt.objs.app.fetch.call(null, a));
  lt.objs.app.store_BANG_.call(null, a, c);
  return c;
};
lt.objs.app.ensure_greater = function(a, b) {
  var c = "string" === typeof a ? parseInt(a) : a;
  return c > b ? c : b;
};
lt.objs.app.zoom_level = function() {
  return cljs.core.not_EQ_.call(null, lt.objs.app.frame.getZoomFactor(), 0) ? lt.objs.app.frame.getZoomFactor() : null;
};
lt.objs.app.open_window = function() {
  return lt.util.ipc.send.call(null, "createWindow");
};
lt.objs.app.__BEH__refresh = function(a) {
  lt.objs.app.closing = !0;
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "reload", "reload", 4374230283));
  return cljs.core.truth_(lt.objs.app.closing) ? lt.objs.app.refresh.call(null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "refresh", "lt.objs.app/refresh", 2086834125), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__refresh, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh", "refresh", 2099349069), null], null), null));
lt.objs.app.__BEH__close_BANG_ = function(a) {
  lt.objs.app.closing = !0;
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close", "close", 1108660586));
  return cljs.core.truth_(lt.objs.app.closing) ? lt.objs.app.close.call(null, !0) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "close!", "lt.objs.app/close!", 3934658067), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__close_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], null), null));
lt.objs.app.__BEH__notify_init_window = function(a) {
  return lt.util.ipc.send.call(null, "initWindow", lt.objs.app.window_number.call(null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "notify-init-window", "lt.objs.app/notify-init-window", 4741533683), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__notify_init_window, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.app.__BEH__store_position_on_close = function(a) {
  if (!cljs.core.truth_(lt.objs.app.win.isFullScreen())) {
    var b = lt.objs.app.win.getSize();
    a = cljs.core.nth.call(null, b, 0, null);
    b = cljs.core.nth.call(null, b, 1, null);
    lt.objs.app.store_BANG_.call(null, new cljs.core.Keyword(null, "width", "width", 1127031096), a);
    lt.objs.app.store_BANG_.call(null, new cljs.core.Keyword(null, "height", "height", 4087841945), b);
    b = lt.objs.app.win.getPosition();
    a = cljs.core.nth.call(null, b, 0, null);
    b = cljs.core.nth.call(null, b, 1, null);
    lt.objs.app.store_BANG_.call(null, new cljs.core.Keyword(null, "x", "x", 1013904362), a);
    lt.objs.app.store_BANG_.call(null, new cljs.core.Keyword(null, "y", "y", 1013904363), b);
  }
  return localStorage.fullscreen = lt.objs.app.win.isFullScreen();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "store-position-on-close", "lt.objs.app/store-position-on-close", 4276509686), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__store_position_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "refresh", "refresh", 2099349069), null, new cljs.core.Keyword(null, 
"closed", "closed", 3951351006), null], null), null));
lt.objs.app.__BEH__restore_fullscreen = function(a) {
  return cljs.core._EQ_.call(null, localStorage.fullscreen, "true") ? lt.objs.app.win.setFullScreen(!0) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "restore-fullscreen", "lt.objs.app/restore-fullscreen", 4105867086), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__restore_fullscreen, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.app.__BEH__restore_position_on_init = function(a) {
  return cljs.core.truth_(localStorage.width) ? (lt.objs.app.win.setSize(lt.objs.app.ensure_greater.call(null, localStorage.width, 400), lt.objs.app.ensure_greater.call(null, localStorage.height, 400)), lt.objs.app.win.setPosition(lt.objs.app.ensure_greater.call(null, localStorage.x, 0), lt.objs.app.ensure_greater.call(null, localStorage.y, 0))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "restore-position-on-init", "lt.objs.app/restore-position-on-init", 2792598979), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__restore_position_on_init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.app.__BEH__on_show_bind_navigate = function(a) {
  return lt.util.dom.on.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#canvas", "#canvas", 644055725)), new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    return cljs.core._EQ_.call(null, a.target.nodeName, "A") && cljs.core.not.call(null, a.defaultPrevented) && (lt.util.dom.prevent.call(null, a), a = a.target.href, cljs.core.truth_(a)) ? (lt.objs.platform.open_url.call(null, a), lt.objs.app.win.focus()) : null;
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "on-show-bind-navigate", "lt.objs.app/on-show-bind-navigate", 1419254217), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__on_show_bind_navigate, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.app.__BEH__track_focus = function(a) {
  return lt.objs.app.store_BANG_.call(null, new cljs.core.Keyword(null, "focusedWindow", "focusedWindow", 2946535865), lt.objs.app.window_number.call(null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "track-focus", "lt.objs.app/track-focus", 886975714), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__track_focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), null, new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), 
null));
lt.objs.app.__BEH__focus_class = function(a) {
  lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "active", "active", 3885920888));
  return lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "focus-class", "lt.objs.app/focus-class", 2565082997), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__focus_class, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), null, new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), 
null));
lt.objs.app.__BEH__blur_class = function(a) {
  lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "active", "active", 3885920888));
  return lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "blur-class", "lt.objs.app/blur-class", 3477879718), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__blur_class, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "blur", "blur", 1016931289), null], null), null));
lt.objs.app.run_commands = function() {
  var a = function(a, b) {
    if (cljs.core.seq.call(null, b)) {
      for (var e = cljs.core.vector_QMARK_.call(null, cljs.core.first.call(null, b)) ? cljs.core.first.call(null, b) : b, e = cljs.core.seq.call(null, e), f = null, g = 0, h = 0;;) {
        if (h < g) {
          var k = cljs.core._nth.call(null, f, h);
          cljs.core.coll_QMARK_.call(null, k) ? cljs.core.apply.call(null, lt.objs.command.exec_BANG_, k) : lt.objs.command.exec_BANG_.call(null, k);
          h += 1;
        } else {
          if (e = cljs.core.seq.call(null, e)) {
            f = e, cljs.core.chunked_seq_QMARK_.call(null, f) ? (e = cljs.core.chunk_first.call(null, f), g = cljs.core.chunk_rest.call(null, f), f = e, k = cljs.core.count.call(null, e), e = g, g = k) : (k = cljs.core.first.call(null, f), cljs.core.coll_QMARK_.call(null, k) ? cljs.core.apply.call(null, lt.objs.command.exec_BANG_, k) : lt.objs.command.exec_BANG_.call(null, k), e = cljs.core.next.call(null, f), f = null, g = 0), h = 0;
          } else {
            return null;
          }
        }
      }
    } else {
      return null;
    }
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "run-pre-init", "lt.objs.app/run-pre-init", 1828105264), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.run_commands, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Run commands before init", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "commands", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "list", "list", 1017226256), new cljs.core.Keyword(null, "items", "items", 1114430258), lt.objs.command.completions], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pre-init", "pre-init", 3967677804), null], null), null), new cljs.core.Keyword(null, 
"type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "run-on-init", "lt.objs.app/run-on-init", 4379501616), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.run_commands, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Run commands on init", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "commands", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "list", "list", 1017226256), new cljs.core.Keyword(null, "items", "items", 1114430258), lt.objs.command.completions], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null), new cljs.core.Keyword(null, 
"type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "run-post-init", "lt.objs.app/run-post-init", 2244260429), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.run_commands, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Run commands after init", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "commands", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "list", "list", 1017226256), new cljs.core.Keyword(null, "items", "items", 1114430258), lt.objs.command.completions], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "post-init", "post-init", 2970371471), null], null), null), new cljs.core.Keyword(null, 
"type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.app.__BEH__set_default_zoom_level = function(a, b) {
  lt.objs.app.default_zoom = b;
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "window.zoom-reset", "window.zoom-reset", 1865763589));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "set-default-zoom-level", "lt.objs.app/set-default-zoom-level", 2566845515), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__set_default_zoom_level, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Set the default zoom level", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "default-zoom-level", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "number", "number", 4274507451)], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.objs.app.__BEH__add_platform_class = function(a) {
  return lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), cljs.core.name.call(null, lt.objs.platform.platform));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "add-platform-class", "lt.objs.app/add-platform-class", 2911469918), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.app.__BEH__add_platform_class, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.app", "app", "lt.objs.app/app", 1001502987), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "app", "app", 1014001043), null, new cljs.core.Keyword(null, "window", "window", 4521119586), null], null), null), new cljs.core.Keyword(null, "delays", "delays", 3973409474), 0, new cljs.core.Keyword(null, "init", "init", 1017141378), 
function(a) {
  return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043), a);
});
lt.objs.app.app = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.app", "app", "lt.objs.app/app", 1001502987));
lt.util.ipc.on.call(null, "app", function(a) {
  return lt.object.raise.call(null, lt.objs.app.app, cljs.core.keyword.call(null, a));
});
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.new", "window.new", 2875320852), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Open new window", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.objs.app.open_window.call(null);
  return null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.close", "window.close", 3118917100), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Close window", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.zoom-in", "window.zoom-in", 4320038099), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Zoom in", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.frame.setZoomFactor(lt.objs.app.frame.getZoomFactor() + 0.2);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.zoom-out", "window.zoom-out", 4719812100), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Zoom out", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return 0 < lt.objs.app.frame.getZoomFactor() ? lt.objs.app.frame.setZoomFactor(lt.objs.app.frame.getZoomFactor() - 0.2) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.zoom-reset", "window.zoom-reset", 1865763589), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Zoom reset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.frame.setZoomFactor(lt.objs.app.default_zoom);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.fullscreen", "window.fullscreen", 3710835691), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Toggle fullscreen", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.win.setFullScreen(cljs.core.not.call(null, lt.objs.app.win.isFullScreen()));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.minimize", "window.minimize", 2477637198), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Minimize", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.win.minimize();
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "window.maximize", "window.maximize", 4253833852), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Maximize", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.win.maximize();
}], null));
lt.util.load = {};
lt.util.load.fpath = require("path");
lt.util.load.fs = require("fs");
lt.util.load.dir = [cljs.core.str(__dirname), cljs.core.str("/..")].join("");
lt.util.load._STAR_force_reload_STAR_ = !1;
lt.util.load.separator = lt.util.load.fpath.sep;
lt.util.load.absolute_QMARK_ = function(a) {
  return cljs.core.boolean$.call(null, cljs.core.re_seq.call(null, /^\s*[\\\\/]|([\w]+:[\\\\/])/, a));
};
lt.util.load.node_module = function(a) {
  return require([cljs.core.str(lt.util.load.dir), cljs.core.str("/core/node_modules/"), cljs.core.str(a)].join(""));
};
lt.util.load.abs_source_mapping_url = function(a, b) {
  var c = cljs.core.second.call(null, cljs.core.re_find.call(null, /\n\/\/# sourceMappingURL=(.*\.map)/, a));
  if (cljs.core.truth_(c)) {
    if (lt.util.load.absolute_QMARK_.call(null, c)) {
      return a;
    }
    c = clojure.string.replace.call(null, lt.util.load.fpath.join(lt.util.load.fpath.dirname(b), c), "\\", "/");
    c = cljs.core._EQ_.call(null, lt.util.load.separator, "\\") ? [cljs.core.str("/"), cljs.core.str(c)].join("") : c;
    return clojure.string.replace_first.call(null, a, /\n\/\/# sourceMappingURL=.*/, [cljs.core.str("\n//# sourceMappingURL\x3d"), cljs.core.str(encodeURI(c))].join(""));
  }
  return a;
};
lt.util.load.prep = function(a, b) {
  return[cljs.core.str(lt.util.load.abs_source_mapping_url.call(null, a, b)), cljs.core.str("\n\n//# sourceURL\x3d"), cljs.core.str(encodeURI(b))].join("");
};
lt.util.load.js = function() {
  var a = null, b = function(b) {
    return a.call(null, b, !1);
  }, c = function(a, b) {
    var c = lt.util.load.absolute_QMARK_.call(null, a) ? a : lt.util.load.fpath.join(lt.util.load.dir, a);
    return cljs.core.truth_(b) ? window.eval(lt.util.load.prep.call(null, lt.util.load.fs.readFileSync(c).toString(), c)) : lt.util.load.fs.readFile(lt.util.load.fpath.join(lt.util.load.dir, c), function(a) {
      return window.eval(lt.util.load.prep.call(null, a.toString(), c));
    });
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.util.load.css = function(a) {
  var b = document.createElement("link");
  b.type = "text/css";
  b.rel = "stylesheet";
  b.href = lt.util.load.absolute_QMARK_.call(null, a) ? [cljs.core.str("file://"), cljs.core.str(a)].join("") : a;
  document.head.appendChild(b);
  return b;
};
lt.util.load.obj_exists_QMARK_ = function(a) {
  a = clojure.string.split.call(null, a, ".");
  for (var b = window;;) {
    if (cljs.core.not.call(null, cljs.core.first.call(null, a))) {
      return b;
    }
    b = b[cljs.core.first.call(null, a)];
    if (cljs.core.truth_(b)) {
      a = cljs.core.rest.call(null, a);
    } else {
      return null;
    }
  }
};
lt.util.load.provided = {};
lt.util.load.provided_ancestors = function(a) {
  return cljs.core.count.call(null, Object.keys(lt.util.load.provided).filter(function(b) {
    return-1 < b.indexOf(a);
  }));
};
lt.util.load.only_ancestors_QMARK_ = function(a, b) {
  return Object.keys(a).length <= lt.util.load.provided_ancestors.call(null, b);
};
lt.util.load.provided_QMARK_ = function(a) {
  if (cljs.core.truth_(lt.util.load._STAR_force_reload_STAR_)) {
    return!1;
  }
  var b;
  cljs.core.truth_(lt.util.load.provided[a]) ? b = !0 : (b = lt.util.load.obj_exists_QMARK_.call(null, a), b = cljs.core.truth_(b) ? !lt.util.load.only_ancestors_QMARK_.call(null, b, a) : null);
  lt.util.load.provided[a] = !0;
  return b;
};
lt.objs.files = {};
lt.objs.files.fs = require("fs");
lt.objs.files.fpath = require("path");
lt.objs.files.wrench = lt.util.load.node_module.call(null, "wrench");
lt.objs.files.shell = require("shell");
lt.objs.files.os = require("os");
lt.objs.files.data_path = lt.objs.platform.get_data_path.call(null);
lt.objs.files.typelist__GT_index = function(a, b) {
  var c = cljs.core.map.call(null, cljs.core.juxt.call(null, new cljs.core.Keyword(null, "name", "name", 1017277949), cljs.core.identity), b), d = function() {
    return function(a) {
      return function g(b) {
        return new cljs.core.LazySeq(null, function(a) {
          return function() {
            for (var c = b;;) {
              var d = cljs.core.seq.call(null, c);
              if (d) {
                var e = d, p = cljs.core.first.call(null, e), d = function(a, b, c, d, e) {
                  return function w(g) {
                    return new cljs.core.LazySeq(null, function(a, b, c, d, e) {
                      return function() {
                        for (;;) {
                          var a = cljs.core.seq.call(null, g);
                          if (a) {
                            if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                              var c = cljs.core.chunk_first.call(null, a), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
                              a: {
                                for (var h = 0;;) {
                                  if (h < d) {
                                    var k = cljs.core._nth.call(null, c, h);
                                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [k, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b)], null));
                                    h += 1;
                                  } else {
                                    c = !0;
                                    break a;
                                  }
                                }
                                c = void 0;
                              }
                              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), w.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
                            }
                            e = cljs.core.first.call(null, a);
                            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b)], null), w.call(null, cljs.core.rest.call(null, a)));
                          }
                          return null;
                        }
                      };
                    }(a, b, c, d, e), null, null);
                  };
                }(c, p, e, d, a);
                if (p = cljs.core.seq.call(null, d.call(null, (new cljs.core.Keyword(null, "exts", "exts", 1017032164)).cljs$core$IFn$_invoke$arity$1(p)))) {
                  return cljs.core.concat.call(null, p, g.call(null, cljs.core.rest.call(null, c)));
                }
                c = cljs.core.rest.call(null, c);
              } else {
                return null;
              }
            }
          };
        }(a), null, null);
      };
    }(c).call(null, b);
  }();
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "types", "types", 1124748267), cljs.core.into.call(null, (new cljs.core.Keyword(null, "types", "types", 1124748267)).cljs$core$IFn$_invoke$arity$2(a, cljs.core.PersistentArrayMap.EMPTY), c), new cljs.core.Keyword(null, "exts", "exts", 1017032164), cljs.core.into.call(null, (new cljs.core.Keyword(null, "exts", "exts", 1017032164)).cljs$core$IFn$_invoke$arity$2(a, cljs.core.PersistentArrayMap.EMPTY), d)], null);
};
lt.objs.files.join = function() {
  var a = function(a) {
    return cljs.core.apply.call(null, lt.objs.files.fpath.join, cljs.core.filter.call(null, cljs.core.string_QMARK_, cljs.core.map.call(null, cljs.core.str, a)));
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.files.ignore_pattern = /(^\..*)|\.class$|target\/|svn|cvs|\.git|\.pyc|~|\.swp|\.jar|.DS_Store/;
lt.objs.files.__BEH__file_types = function(a, b) {
  return lt.object.merge_BANG_.call(null, lt.objs.files.files_obj, lt.objs.files.typelist__GT_index.call(null, cljs.core.deref.call(null, lt.objs.files.files_obj), b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.files", "file-types", "lt.objs.files/file-types", 772671169), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.files.__BEH__file_types, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Files: Associate file types", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, 
[new cljs.core.Keyword(null, "label", "label", 1116631654), "types", new cljs.core.Keyword(null, "example", "example", 3985900764), '[{:exts [:wisp],\n  :mime "text/x-clojurescript",\n  :name "Wisp",\n  :tags [:editor.wisp]}]'], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, 
"type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.files.__BEH__file__DOT__ignore_pattern = function(a, b) {
  return lt.objs.files.ignore_pattern = RegExp(b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.files", "file.ignore-pattern", "lt.objs.files/file.ignore-pattern", 3559884578), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.files.__BEH__file__DOT__ignore_pattern, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Files: Set ignore pattern", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "pattern", new cljs.core.Keyword(null, "example", "example", 3985900764), '"\\\\.git|\\\\.pyc"'], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.files.__BEH__open_failed = function(a, b, c) {
  return lt.objs.console.error([cljs.core.str("Failed to open path '"), cljs.core.str(b), cljs.core.str("' with error: "), cljs.core.str(c)].join(""));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.files", "open-failed", "lt.objs.files/open-failed", 3548431081), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.files.__BEH__open_failed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "files.open.error", "files.open.error", 1703181485), null], null), null));
lt.objs.files.files_obj = lt.object.create.call(null, lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.files", "files", "lt.objs.files/files", 1053592914), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), new cljs.core.Keyword(null, "exts", "exts", 1017032164), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "types", 
"types", 1124748267), cljs.core.PersistentArrayMap.EMPTY));
lt.objs.files.line_ending = lt.objs.files.os.EOL;
lt.objs.files.separator = lt.objs.files.fpath.sep;
lt.objs.files.available_drives = cljs.core.PersistentHashSet.EMPTY;
lt.objs.files.cwd = process.cwd();
cljs.core._EQ_.call(null, lt.objs.files.separator, "\\") && require("child_process").exec("wmic logicaldisk get name", function(a, b, c) {
  a = cljs.core.rest.call(null, b.split(/\r\n|\r|\n/));
  a = cljs.core.map.call(null, function(a) {
    return function(a) {
      return[cljs.core.str(a.trim()), cljs.core.str(lt.objs.files.separator)].join("");
    };
  }(a), cljs.core.remove.call(null, cljs.core.empty_QMARK_, a));
  return lt.objs.files.available_drives = cljs.core.into.call(null, cljs.core.PersistentHashSet.EMPTY, a);
});
lt.objs.files.basename = function() {
  var a = null, b = function(a) {
    return lt.objs.files.fpath.basename(a);
  }, c = function(a, b) {
    return lt.objs.files.fpath.basename(a, b);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.files.get_roots = function() {
  return cljs.core._EQ_.call(null, lt.objs.files.separator, "\\") ? lt.objs.files.available_drives : new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, ["/", null], null), null);
};
lt.objs.files.get_file_parts = function(a) {
  a = lt.objs.files.basename.call(null, a);
  a = clojure.string.split.call(null, a, /\./);
  for (var b = cljs.core.PersistentVector.EMPTY;;) {
    if (cljs.core.empty_QMARK_.call(null, a)) {
      return b;
    }
    var c = cljs.core.rest.call(null, a), b = cljs.core.conj.call(null, b, clojure.string.join.call(null, ".", a));
    a = c;
  }
};
lt.objs.files.ext = function(a) {
  return cljs.core.subs.call(null, lt.objs.files.fpath.extname(a), 1);
};
lt.objs.files.without_ext = function(a) {
  var b = a.lastIndexOf(".");
  return 0 < b ? cljs.core.subs.call(null, a, 0, b) : a;
};
lt.objs.files.ext__GT_type = function(a) {
  var b = (new cljs.core.Keyword(null, "exts", "exts", 1017032164)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.files.files_obj));
  return(new cljs.core.Keyword(null, "types", "types", 1124748267)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.files.files_obj)).call(null, cljs.core.get.call(null, b, a));
};
lt.objs.files.ext__GT_mode = function(a) {
  return(new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.ext__GT_type.call(null, a));
};
lt.objs.files.path__GT_type = function(a) {
  return cljs.core.first.call(null, cljs.core.remove.call(null, cljs.core.nil_QMARK_, cljs.core.map.call(null, function(a) {
    return lt.objs.files.ext__GT_type.call(null, cljs.core.keyword.call(null, a));
  }, lt.objs.files.get_file_parts.call(null, a))));
};
lt.objs.files.path__GT_mode = function(a) {
  return cljs.core.first.call(null, cljs.core.remove.call(null, cljs.core.nil_QMARK_, cljs.core.map.call(null, function(a) {
    return lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, a));
  }, lt.objs.files.get_file_parts.call(null, a))));
};
lt.objs.files.determine_line_ending = function(a) {
  var b = cljs.core.subs.call(null, a, 0, 1E3);
  a = cljs.core.re_seq.call(null, /\r\n/, b);
  b = cljs.core.re_seq.call(null, /[^\r]\n/, b);
  return cljs.core.truth_(cljs.core.truth_(a) ? b : a) ? lt.objs.files.line_ending : cljs.core.not.call(null, a) && cljs.core.not.call(null, b) ? lt.objs.files.line_ending : cljs.core.not.call(null, b) ? "\r\n" : new cljs.core.Keyword(null, "else", "else", 1017020587) ? "\n" : null;
};
lt.objs.files.exists_QMARK_ = function(a) {
  return lt.objs.files.fs.existsSync(a);
};
lt.objs.files.stats = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a) : null;
};
lt.objs.files.dir_QMARK_ = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a).isDirectory() : null;
};
lt.objs.files.file_QMARK_ = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? lt.objs.files.fs.statSync(a).isFile() : null;
};
lt.objs.files.absolute_QMARK_ = function(a) {
  return cljs.core.boolean$.call(null, cljs.core.re_seq.call(null, /^[\\\\/]|([\w]+:[\\\\/])/, a));
};
lt.objs.files.writable_QMARK_ = function(a) {
  a = "" + cljs.core.str(parseInt(lt.objs.files.fs.statSync(a).mode.toString(8), 10));
  a = cljs.core.subs.call(null, a, cljs.core.count.call(null, a) - 3);
  return(new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 4, ["2", null, "3", null, "6", null, "7", null], null), null)).call(null, cljs.core.first.call(null, a));
};
lt.objs.files.resolve = function(a, b) {
  return lt.objs.files.fpath.resolve(a, b);
};
lt.objs.files.real_path = function(a) {
  return lt.objs.files.fs.realpathSync(a);
};
lt.objs.files.__GT_file_BAR_dir = function(a, b) {
  return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, [cljs.core.str(a), cljs.core.str(lt.objs.files.separator), cljs.core.str(b)].join(""))) ? [cljs.core.str(b), cljs.core.str(lt.objs.files.separator)].join("") : "" + cljs.core.str(b);
};
lt.objs.files.bomless_read = function(a) {
  a = lt.objs.files.fs.readFileSync(a, "utf-8");
  return clojure.string.replace.call(null, a, "\ufeff", "");
};
lt.objs.files.open = function(a, b) {
  try {
    var c = lt.objs.files.bomless_read.call(null, a);
    if (cljs.core.truth_(c)) {
      var d = lt.objs.files.ext.call(null, a);
      b.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "content", "content", 1965434859), c, new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690), lt.objs.files.determine_line_ending.call(null, c), new cljs.core.Keyword(null, "type", "type", 1017479852), function() {
        var b = lt.objs.files.path__GT_mode.call(null, a);
        return cljs.core.truth_(b) ? b : d;
      }()], null));
      return lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.open", "files.open", 3666971347), c);
    }
    return null;
  } catch (e) {
    return d = e, lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.open.error", "files.open.error", 1703181485), a, d), cljs.core.truth_(b) ? b.call(null, null, d) : null;
  }
};
lt.objs.files.open_sync = function(a) {
  try {
    var b = lt.objs.files.bomless_read.call(null, a);
    if (cljs.core.truth_(b)) {
      var c = lt.objs.files.ext.call(null, a);
      lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.open", "files.open", 3666971347), b);
      var d = cljs.core.PersistentArrayMap, e = new cljs.core.Keyword(null, "content", "content", 1965434859), f = new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690), g = lt.objs.files.determine_line_ending.call(null, b), h = new cljs.core.Keyword(null, "type", "type", 1017479852), k;
      var l = lt.objs.files.ext__GT_mode.call(null, cljs.core.keyword.call(null, c));
      k = cljs.core.truth_(l) ? l : c;
      return new d(null, 3, [e, b, f, g, h, k], null);
    }
    return null;
  } catch (m) {
    return c = m, lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.open.error", "files.open.error", 1703181485), a, c), null;
  }
};
lt.objs.files.save = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    try {
      return lt.objs.files.fs.writeFileSync(a, b), lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.save", "files.save", 3667076614), a), cljs.core.truth_(e) ? e.call(null) : null;
    } catch (f) {
      return lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.save.error", "files.save.error", 2424546720), a, f), cljs.core.truth_(e) ? e.call(null, f) : null;
    }
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.files.append = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    try {
      return lt.objs.files.fs.appendFileSync(a, b), lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.save", "files.save", 3667076614), a), cljs.core.truth_(e) ? e.call(null) : null;
    } catch (f) {
      return lt.object.raise.call(null, lt.objs.files.files_obj, new cljs.core.Keyword(null, "files.save.error", "files.save.error", 2424546720), a, f), cljs.core.truth_(e) ? e.call(null, f) : null;
    }
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.files.trash_BANG_ = function(a) {
  return lt.objs.files.shell.moveItemTotrash(a);
};
lt.objs.files.delete_BANG_ = function(a) {
  return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, a)) ? lt.objs.files.wrench.rmdirSyncRecursive(a) : lt.objs.files.fs.unlinkSync(a);
};
lt.objs.files.move_BANG_ = function(a, b) {
  return lt.objs.files.fs.renameSync(a, b);
};
lt.objs.files.copy = function(a, b) {
  return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, a)) ? lt.objs.files.wrench.copyDirSyncRecursive(a, b) : lt.objs.files.save.call(null, b, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, a)));
};
lt.objs.files.mkdir = function(a) {
  return lt.objs.files.fs.mkdirSync(a);
};
lt.objs.files.parent = function(a) {
  return lt.objs.files.fpath.dirname(a);
};
lt.objs.files.next_available_name = function(a) {
  if (cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, a))) {
    return a;
  }
  var b = lt.objs.files.ext.call(null, a), c = lt.objs.files.without_ext.call(null, lt.objs.files.basename.call(null, a));
  a = lt.objs.files.parent.call(null, a);
  for (var d = 1, e = lt.objs.files.join.call(null, a, [cljs.core.str(c), cljs.core.str(d), cljs.core.str("."), cljs.core.str(b)].join(""));;) {
    if (cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, e))) {
      return e;
    }
    var e = d + 1, f = lt.objs.files.join.call(null, a, [cljs.core.str(c), cljs.core.str(d + 1), cljs.core.str(cljs.core.truth_(b) ? [cljs.core.str("."), cljs.core.str(b)].join("") : null)].join("")), d = e, e = f;
  }
};
lt.objs.files.ls = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    try {
      var c = cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.__GT_file_BAR_dir, a), lt.objs.files.fs.readdirSync(a));
      return cljs.core.truth_(b) ? b.call(null, c) : c;
    } catch (g) {
      return cljs.core.truth_(b) && b.call(null, null), null;
    }
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.files.ls_sync = function(a, b) {
  try {
    var c = cljs.core.remove.call(null, function(a) {
      return cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, a);
    }, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.__GT_file_BAR_dir, a), lt.objs.files.fs.readdirSync(a)));
    return cljs.core.truth_((new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(b)) ? cljs.core.filter.call(null, function(b) {
      return lt.objs.files.file_QMARK_.call(null, lt.objs.files.join.call(null, a, b));
    }, c) : cljs.core.truth_((new cljs.core.Keyword(null, "dirs", "dirs", 1016987896)).cljs$core$IFn$_invoke$arity$1(b)) ? cljs.core.filter.call(null, function(b) {
      return lt.objs.files.dir_QMARK_.call(null, lt.objs.files.join.call(null, a, b));
    }, c) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null;
  } catch (d) {
    return lt.objs.console.error(d);
  }
};
lt.objs.files.full_path_ls = function(a) {
  try {
    return cljs.core.doall.call(null, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.join, a), lt.objs.files.fs.readdirSync(a)));
  } catch (b) {
    return lt.objs.console.error(b);
  }
};
lt.objs.files.dirs = function(a) {
  try {
    return cljs.core.filter.call(null, lt.objs.files.dir_QMARK_, cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.files.join, a), lt.objs.files.fs.readdirSync(a)));
  } catch (b) {
    return lt.objs.console.error(b);
  }
};
lt.objs.files.home = function() {
  var a = null, b = function() {
    return a.call(null, null);
  }, c = function(a) {
    var b = cljs.core._EQ_.call(null, process.platform, "win32") ? process.env.USERPROFILE : process.env.HOME;
    return lt.objs.files.join.call(null, b, cljs.core.truth_(a) ? a : lt.objs.files.separator);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.files.lt_home = function() {
  var a = null, b = function() {
    return lt.util.load.dir;
  }, c = function(b) {
    return lt.objs.files.join.call(null, a.call(null), b);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.files.lt_user_dir = function() {
  var a = null, b = function() {
    return a.call(null, "");
  }, c = function(a) {
    return cljs.core.truth_(process.env.LT_USER_DIR) ? lt.objs.files.join.call(null, process.env.LT_USER_DIR, a) : lt.objs.files.join.call(null, lt.objs.files.data_path, a);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.files.walk_up_find = function(a, b) {
  for (var c = lt.objs.files.get_roots.call(null), d = a, e = "";;) {
    if (cljs.core.truth_(function() {
      var a = cljs.core.empty_QMARK_.call(null, d);
      if (a) {
        return a;
      }
      a = c.call(null, d);
      return cljs.core.truth_(a) ? a : cljs.core._EQ_.call(null, d, e);
    }())) {
      return null;
    }
    if (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.join.call(null, d, b)))) {
      return lt.objs.files.join.call(null, d, b);
    }
    var f = lt.objs.files.parent.call(null, d), g = d, d = f, e = g;
  }
};
lt.objs.files.relative = function(a, b) {
  return lt.objs.files.fpath.relative(a, b);
};
lt.objs.files.__GT_name_BAR_path = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), e = cljs.core.truth_(e) ? lt.objs.files.relative.call(null, e, a) : a;
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.files.fpath.basename(a), e], null);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.files.path_segs = function(a) {
  var b = a.split(lt.objs.files.separator);
  a = cljs.core.truth_(function() {
    var a = lt.objs.files.fpath.extname(cljs.core.last.call(null, b));
    return cljs.core.truth_(a) ? a : cljs.core.empty_QMARK_.call(null, cljs.core.last.call(null, b));
  }()) ? cljs.core.butlast.call(null, b) : b;
  return cljs.core.vec.call(null, cljs.core.map.call(null, function(a) {
    return[cljs.core.str(a), cljs.core.str(lt.objs.files.separator)].join("");
  }, a));
};
lt.objs.files.filter_walk = function(a, b) {
  for (var c = lt.objs.files.dirs.call(null, b), d = cljs.core.filterv.call(null, a, lt.objs.files.full_path_ls.call(null, b));;) {
    if (cljs.core.not.call(null, cljs.core.seq.call(null, c))) {
      return d;
    }
    var e = cljs.core.first.call(null, c), f = cljs.core.filterv.call(null, a, lt.objs.files.full_path_ls.call(null, e)), c = cljs.core.concat.call(null, cljs.core.rest.call(null, c), lt.objs.files.dirs.call(null, e)), d = cljs.core.concat.call(null, d, f);
  }
};
cljs.reader = {};
cljs.reader.PushbackReader = function() {
  return{};
}();
cljs.reader.read_char = function(a) {
  if (a ? a.cljs$reader$PushbackReader$read_char$arity$1 : a) {
    return a.cljs$reader$PushbackReader$read_char$arity$1(a);
  }
  var b;
  b = cljs.reader.read_char[goog.typeOf(null == a ? null : a)];
  if (!b && (b = cljs.reader.read_char._, !b)) {
    throw cljs.core.missing_protocol.call(null, "PushbackReader.read-char", a);
  }
  return b.call(null, a);
};
cljs.reader.unread = function(a, b) {
  if (a ? a.cljs$reader$PushbackReader$unread$arity$2 : a) {
    return a.cljs$reader$PushbackReader$unread$arity$2(a, b);
  }
  var c;
  c = cljs.reader.unread[goog.typeOf(null == a ? null : a)];
  if (!c && (c = cljs.reader.unread._, !c)) {
    throw cljs.core.missing_protocol.call(null, "PushbackReader.unread", a);
  }
  return c.call(null, a, b);
};
cljs.reader.StringPushbackReader = function(a, b, c) {
  this.s = a;
  this.buffer = b;
  this.idx = c;
};
cljs.reader.StringPushbackReader.cljs$lang$type = !0;
cljs.reader.StringPushbackReader.cljs$lang$ctorStr = "cljs.reader/StringPushbackReader";
cljs.reader.StringPushbackReader.cljs$lang$ctorPrWriter = function(a, b, c) {
  return cljs.core._write.call(null, b, "cljs.reader/StringPushbackReader");
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$ = !0;
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$read_char$arity$1 = function(a) {
  return 0 === this.buffer.length ? (this.idx += 1, this.s[this.idx]) : this.buffer.pop();
};
cljs.reader.StringPushbackReader.prototype.cljs$reader$PushbackReader$unread$arity$2 = function(a, b) {
  return this.buffer.push(b);
};
cljs.reader.__GT_StringPushbackReader = function(a, b, c) {
  return new cljs.reader.StringPushbackReader(a, b, c);
};
cljs.reader.push_back_reader = function(a) {
  return new cljs.reader.StringPushbackReader(a, [], -1);
};
cljs.reader.whitespace_QMARK_ = function(a) {
  var b = goog.string.isBreakingWhitespace(a);
  return cljs.core.truth_(b) ? b : "," === a;
};
cljs.reader.numeric_QMARK_ = function(a) {
  return goog.string.isNumeric(a);
};
cljs.reader.comment_prefix_QMARK_ = function(a) {
  return ";" === a;
};
cljs.reader.number_literal_QMARK_ = function(a, b) {
  return cljs.reader.numeric_QMARK_.call(null, b) || ("+" === b || "-" === b) && cljs.reader.numeric_QMARK_.call(null, function() {
    var b = cljs.reader.read_char.call(null, a);
    cljs.reader.unread.call(null, a, b);
    return b;
  }());
};
cljs.reader.reader_error = function() {
  var a = function(a, b) {
    throw Error(cljs.core.apply.call(null, cljs.core.str, b));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
cljs.reader.macro_terminating_QMARK_ = function(a) {
  var b = "#" !== a;
  return b && (b = "'" !== a) ? (b = ":" !== a) ? cljs.reader.macros.call(null, a) : b : b;
};
cljs.reader.read_token = function(a, b) {
  for (var c = new goog.string.StringBuffer(b), d = cljs.reader.read_char.call(null, a);;) {
    if (null == d || cljs.reader.whitespace_QMARK_.call(null, d) || cljs.reader.macro_terminating_QMARK_.call(null, d)) {
      return cljs.reader.unread.call(null, a, d), c.toString();
    }
    c.append(d);
    d = cljs.reader.read_char.call(null, a);
  }
};
cljs.reader.skip_line = function(a, b) {
  for (;;) {
    var c = cljs.reader.read_char.call(null, a);
    if ("\n" === c || "\r" === c || null == c) {
      return a;
    }
  }
};
cljs.reader.int_pattern = cljs.core.re_pattern.call(null, "([-+]?)(?:(0)|([1-9][0-9]*)|0[xX]([0-9A-Fa-f]+)|0([0-7]+)|([1-9][0-9]?)[rR]([0-9A-Za-z]+)|0[0-9]+)(N)?");
cljs.reader.ratio_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+)/([0-9]+)");
cljs.reader.float_pattern = cljs.core.re_pattern.call(null, "([-+]?[0-9]+(\\.[0-9]*)?([eE][-+]?[0-9]+)?)(M)?");
cljs.reader.symbol_pattern = cljs.core.re_pattern.call(null, "[:]?([^0-9/].*/)?([^0-9/][^/]*)");
cljs.reader.re_find_STAR_ = function(a, b) {
  var c = a.exec(b);
  return null == c ? null : 1 === c.length ? c[0] : c;
};
cljs.reader.match_int = function(a) {
  var b = cljs.reader.re_find_STAR_.call(null, cljs.reader.int_pattern, a);
  a = b[2];
  if (null == a || 1 > a.length) {
    a = "-" === b[1] ? -1 : 1;
    var c = cljs.core.truth_(b[3]) ? [b[3], 10] : cljs.core.truth_(b[4]) ? [b[4], 16] : cljs.core.truth_(b[5]) ? [b[5], 8] : cljs.core.truth_(b[7]) ? [b[7], parseInt(b[7])] : new cljs.core.Keyword(null, "default", "default", 2558708147) ? [null, null] : null, b = c[0], c = c[1];
    return null == b ? null : a * parseInt(b, c);
  }
  return 0;
};
cljs.reader.match_ratio = function(a) {
  a = cljs.reader.re_find_STAR_.call(null, cljs.reader.ratio_pattern, a);
  var b = a[2];
  return parseInt(a[1]) / parseInt(b);
};
cljs.reader.match_float = function(a) {
  return parseFloat(a);
};
cljs.reader.re_matches_STAR_ = function(a, b) {
  var c = a.exec(b);
  return null != c && c[0] === b ? 1 === c.length ? c[0] : c : null;
};
cljs.reader.match_number = function(a) {
  return cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.int_pattern, a)) ? cljs.reader.match_int.call(null, a) : cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.ratio_pattern, a)) ? cljs.reader.match_ratio.call(null, a) : cljs.core.truth_(cljs.reader.re_matches_STAR_.call(null, cljs.reader.float_pattern, a)) ? cljs.reader.match_float.call(null, a) : null;
};
cljs.reader.escape_char_map = function(a) {
  if ("t" === a) {
    return "\t";
  }
  if ("r" === a) {
    return "\r";
  }
  if ("n" === a) {
    return "\n";
  }
  if ("\\" === a) {
    return "\\";
  }
  if ('"' === a) {
    return'"';
  }
  if ("b" === a) {
    return "\b";
  }
  if ("f" === a) {
    return "\f";
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
cljs.reader.read_2_chars = function(a) {
  return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a))).toString();
};
cljs.reader.read_4_chars = function(a) {
  return(new goog.string.StringBuffer(cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a), cljs.reader.read_char.call(null, a))).toString();
};
cljs.reader.unicode_2_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{2}");
cljs.reader.unicode_4_pattern = cljs.core.re_pattern.call(null, "[0-9A-Fa-f]{4}");
cljs.reader.validate_unicode_escape = function(a, b, c, d) {
  return cljs.core.truth_(cljs.core.re_matches.call(null, a, d)) ? d : cljs.reader.reader_error.call(null, b, "Unexpected unicode escape \\", c, d);
};
cljs.reader.make_unicode_char = function(a) {
  a = parseInt(a, 16);
  return String.fromCharCode(a);
};
cljs.reader.escape_char = function(a, b) {
  var c = cljs.reader.read_char.call(null, b), d = cljs.reader.escape_char_map.call(null, c);
  return cljs.core.truth_(d) ? d : "x" === c ? cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_2_pattern, b, c, cljs.reader.read_2_chars.call(null, b))) : "u" === c ? cljs.reader.make_unicode_char.call(null, cljs.reader.validate_unicode_escape.call(null, cljs.reader.unicode_4_pattern, b, c, cljs.reader.read_4_chars.call(null, b))) : cljs.reader.numeric_QMARK_.call(null, c) ? String.fromCharCode(c) : new cljs.core.Keyword(null, "else", "else", 
  1017020587) ? cljs.reader.reader_error.call(null, b, "Unexpected unicode escape \\", c) : null;
};
cljs.reader.read_past = function(a, b) {
  for (var c = cljs.reader.read_char.call(null, b);;) {
    if (cljs.core.truth_(a.call(null, c))) {
      c = cljs.reader.read_char.call(null, b);
    } else {
      return c;
    }
  }
};
cljs.reader.read_delimited_list = function(a, b, c) {
  for (var d = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);;) {
    var e = cljs.reader.read_past.call(null, cljs.reader.whitespace_QMARK_, b);
    cljs.core.truth_(e) || cljs.reader.reader_error.call(null, b, "EOF while reading");
    if (a === e) {
      return cljs.core.persistent_BANG_.call(null, d);
    }
    var f = cljs.reader.macros.call(null, e);
    cljs.core.truth_(f) ? e = f.call(null, b, e) : (cljs.reader.unread.call(null, b, e), e = cljs.reader.read.call(null, b, !0, null, c));
    d = e === b ? d : cljs.core.conj_BANG_.call(null, d, e);
  }
};
cljs.reader.not_implemented = function(a, b) {
  return cljs.reader.reader_error.call(null, a, "Reader for ", b, " not implemented yet");
};
cljs.reader.read_dispatch = function(a, b) {
  var c = cljs.reader.read_char.call(null, a), d = cljs.reader.dispatch_macros.call(null, c);
  if (cljs.core.truth_(d)) {
    return d.call(null, a, b);
  }
  d = cljs.reader.maybe_read_tagged_type.call(null, a, c);
  return cljs.core.truth_(d) ? d : cljs.reader.reader_error.call(null, a, "No dispatch macro for ", c);
};
cljs.reader.read_unmatched_delimiter = function(a, b) {
  return cljs.reader.reader_error.call(null, a, "Unmached delimiter ", b);
};
cljs.reader.read_list = function(a, b) {
  return cljs.core.apply.call(null, cljs.core.list, cljs.reader.read_delimited_list.call(null, ")", a, !0));
};
cljs.reader.read_comment = cljs.reader.skip_line;
cljs.reader.read_vector = function(a, b) {
  return cljs.reader.read_delimited_list.call(null, "]", a, !0);
};
cljs.reader.read_map = function(a, b) {
  var c = cljs.reader.read_delimited_list.call(null, "}", a, !0);
  cljs.core.odd_QMARK_.call(null, cljs.core.count.call(null, c)) && cljs.reader.reader_error.call(null, a, "Map literal must contain an even number of forms");
  return cljs.core.apply.call(null, cljs.core.hash_map, c);
};
cljs.reader.read_number = function(a, b) {
  for (var c = new goog.string.StringBuffer(b), d = cljs.reader.read_char.call(null, a);;) {
    if (cljs.core.truth_(function() {
      var a = null == d;
      return a ? a : (a = cljs.reader.whitespace_QMARK_.call(null, d)) ? a : cljs.reader.macros.call(null, d);
    }())) {
      cljs.reader.unread.call(null, a, d);
      var e = c.toString(), c = cljs.reader.match_number.call(null, e);
      return cljs.core.truth_(c) ? c : cljs.reader.reader_error.call(null, a, "Invalid number format [", e, "]");
    }
    c.append(d);
    d = e = cljs.reader.read_char.call(null, a);
  }
};
cljs.reader.read_string_STAR_ = function(a, b) {
  for (var c = new goog.string.StringBuffer, d = cljs.reader.read_char.call(null, a);;) {
    if (null == d) {
      return cljs.reader.reader_error.call(null, a, "EOF while reading");
    }
    if ("\\" === d) {
      c.append(cljs.reader.escape_char.call(null, c, a)), d = cljs.reader.read_char.call(null, a);
    } else {
      if ('"' === d) {
        return c.toString();
      }
      if (new cljs.core.Keyword(null, "default", "default", 2558708147)) {
        c.append(d), d = cljs.reader.read_char.call(null, a);
      } else {
        return null;
      }
    }
  }
};
cljs.reader.special_symbols = function(a, b) {
  return "nil" === a ? null : "true" === a ? !0 : "false" === a ? !1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? b : null;
};
cljs.reader.read_symbol = function(a, b) {
  var c = cljs.reader.read_token.call(null, a, b);
  return cljs.core.truth_(goog.string.contains(c, "/")) ? cljs.core.symbol.call(null, cljs.core.subs.call(null, c, 0, c.indexOf("/")), cljs.core.subs.call(null, c, c.indexOf("/") + 1, c.length)) : cljs.reader.special_symbols.call(null, c, cljs.core.symbol.call(null, c));
};
cljs.reader.read_keyword = function(a, b) {
  var c = cljs.reader.read_token.call(null, a, cljs.reader.read_char.call(null, a)), d = cljs.reader.re_matches_STAR_.call(null, cljs.reader.symbol_pattern, c), c = d[0], e = d[1], d = d[2];
  return void 0 !== e && ":/" === e.substring(e.length - 2, e.length) || ":" === d[d.length - 1] || -1 !== c.indexOf("::", 1) ? cljs.reader.reader_error.call(null, a, "Invalid token: ", c) : null != e && 0 < e.length ? cljs.core.keyword.call(null, e.substring(0, e.indexOf("/")), d) : cljs.core.keyword.call(null, c);
};
cljs.reader.desugar_meta = function(a) {
  return a instanceof cljs.core.Symbol ? new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), a], null) : "string" === typeof a ? new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), a], null) : a instanceof cljs.core.Keyword ? new cljs.core.PersistentArrayMap.fromArray([a, !0], !0, !1) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? a : null;
};
cljs.reader.wrapping_reader = function(a) {
  return function(b, c) {
    return cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, cljs.reader.read.call(null, b, !0, null, !0)), a);
  };
};
cljs.reader.throwing_reader = function(a) {
  return function(b, c) {
    return cljs.reader.reader_error.call(null, b, a);
  };
};
cljs.reader.read_meta = function(a, b) {
  var c = cljs.reader.desugar_meta.call(null, cljs.reader.read.call(null, a, !0, null, !0));
  cljs.core.map_QMARK_.call(null, c) || cljs.reader.reader_error.call(null, a, "Metadata must be Symbol,Keyword,String or Map");
  var d = cljs.reader.read.call(null, a, !0, null, !0);
  return(d ? d.cljs$lang$protocol_mask$partition0$ & 262144 || d.cljs$core$IWithMeta$ || (d.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, d)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IWithMeta, d)) ? cljs.core.with_meta.call(null, d, cljs.core.merge.call(null, cljs.core.meta.call(null, d), c)) : cljs.reader.reader_error.call(null, a, "Metadata can only be applied to IWithMetas");
};
cljs.reader.read_set = function(a, b) {
  return cljs.core.set.call(null, cljs.reader.read_delimited_list.call(null, "}", a, !0));
};
cljs.reader.read_regex = function(a, b) {
  return cljs.core.re_pattern.call(null, cljs.reader.read_string_STAR_.call(null, a, b));
};
cljs.reader.read_discard = function(a, b) {
  cljs.reader.read.call(null, a, !0, null, !0);
  return a;
};
cljs.reader.macros = function(a) {
  if ('"' === a) {
    return cljs.reader.read_string_STAR_;
  }
  if (":" === a) {
    return cljs.reader.read_keyword;
  }
  if (";" === a) {
    return cljs.reader.read_comment;
  }
  if ("'" === a) {
    return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "quote", "quote", -1532577739, null));
  }
  if ("@" === a) {
    return cljs.reader.wrapping_reader.call(null, new cljs.core.Symbol(null, "deref", "deref", -1545057749, null));
  }
  if ("^" === a) {
    return cljs.reader.read_meta;
  }
  if ("`" === a || "~" === a) {
    return cljs.reader.not_implemented;
  }
  if ("(" === a) {
    return cljs.reader.read_list;
  }
  if (")" === a) {
    return cljs.reader.read_unmatched_delimiter;
  }
  if ("[" === a) {
    return cljs.reader.read_vector;
  }
  if ("]" === a) {
    return cljs.reader.read_unmatched_delimiter;
  }
  if ("{" === a) {
    return cljs.reader.read_map;
  }
  if ("}" === a) {
    return cljs.reader.read_unmatched_delimiter;
  }
  if ("\\" === a) {
    return cljs.reader.read_char;
  }
  if ("#" === a) {
    return cljs.reader.read_dispatch;
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
cljs.reader.dispatch_macros = function(a) {
  if ("{" === a) {
    return cljs.reader.read_set;
  }
  if ("\x3c" === a) {
    return cljs.reader.throwing_reader.call(null, "Unreadable form");
  }
  if ('"' === a) {
    return cljs.reader.read_regex;
  }
  if ("!" === a) {
    return cljs.reader.read_comment;
  }
  if ("_" === a) {
    return cljs.reader.read_discard;
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
cljs.reader.read = function(a, b, c, d) {
  for (;;) {
    d = cljs.reader.read_char.call(null, a);
    if (null == d) {
      return cljs.core.truth_(b) ? cljs.reader.reader_error.call(null, a, "EOF while reading") : c;
    }
    if (!cljs.reader.whitespace_QMARK_.call(null, d)) {
      if (cljs.reader.comment_prefix_QMARK_.call(null, d)) {
        a = cljs.reader.read_comment.call(null, a, d);
      } else {
        if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
          var e = cljs.reader.macros.call(null, d);
          d = cljs.core.truth_(e) ? e.call(null, a, d) : cljs.reader.number_literal_QMARK_.call(null, a, d) ? cljs.reader.read_number.call(null, a, d) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.reader.read_symbol.call(null, a, d) : null;
          if (d !== a) {
            return d;
          }
        } else {
          return null;
        }
      }
    }
  }
};
cljs.reader.read_string = function(a) {
  a = cljs.reader.push_back_reader.call(null, a);
  return cljs.reader.read.call(null, a, !0, null, !1);
};
cljs.reader.zero_fill_right_and_truncate = function(a, b) {
  if (cljs.core._EQ_.call(null, b, cljs.core.count.call(null, a))) {
    return a;
  }
  if (b < cljs.core.count.call(null, a)) {
    return cljs.core.subs.call(null, a, 0, b);
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    for (var c = new goog.string.StringBuffer(a);;) {
      if (c.getLength() < b) {
        c = c.append("0");
      } else {
        return c.toString();
      }
    }
  } else {
    return null;
  }
};
cljs.reader.divisible_QMARK_ = function(a, b) {
  return 0 === cljs.core.mod.call(null, a, b);
};
cljs.reader.indivisible_QMARK_ = function(a, b) {
  return!cljs.reader.divisible_QMARK_.call(null, a, b);
};
cljs.reader.leap_year_QMARK_ = function(a) {
  return cljs.reader.divisible_QMARK_.call(null, a, 4) && (cljs.reader.indivisible_QMARK_.call(null, a, 100) || cljs.reader.divisible_QMARK_.call(null, a, 400));
};
cljs.reader.days_in_month = function() {
  var a = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], null), b = new cljs.core.PersistentVector(null, 13, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, 31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], null);
  return function(c, d) {
    return cljs.core.get.call(null, cljs.core.truth_(d) ? b : a, c);
  };
}();
cljs.reader.timestamp_regex = /(\d\d\d\d)(?:-(\d\d)(?:-(\d\d)(?:[T](\d\d)(?::(\d\d)(?::(\d\d)(?:[.](\d+))?)?)?)?)?)?(?:[Z]|([-+])(\d\d):(\d\d))?/;
cljs.reader.parse_int = function(a) {
  a = parseInt(a);
  return cljs.core.not.call(null, isNaN(a)) ? a : null;
};
cljs.reader.check = function(a, b, c, d) {
  a <= b && b <= c || cljs.reader.reader_error.call(null, null, [cljs.core.str(d), cljs.core.str(" Failed:  "), cljs.core.str(a), cljs.core.str("\x3c\x3d"), cljs.core.str(b), cljs.core.str("\x3c\x3d"), cljs.core.str(c)].join(""));
  return b;
};
cljs.reader.parse_and_validate_timestamp = function(a) {
  var b = cljs.core.re_matches.call(null, cljs.reader.timestamp_regex, a);
  cljs.core.nth.call(null, b, 0, null);
  var c = cljs.core.nth.call(null, b, 1, null), d = cljs.core.nth.call(null, b, 2, null), e = cljs.core.nth.call(null, b, 3, null), f = cljs.core.nth.call(null, b, 4, null), g = cljs.core.nth.call(null, b, 5, null), h = cljs.core.nth.call(null, b, 6, null), k = cljs.core.nth.call(null, b, 7, null), l = cljs.core.nth.call(null, b, 8, null), m = cljs.core.nth.call(null, b, 9, null), n = cljs.core.nth.call(null, b, 10, null);
  if (cljs.core.not.call(null, b)) {
    return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(a)].join(""));
  }
  a = cljs.reader.parse_int.call(null, c);
  var b = function() {
    var a = cljs.reader.parse_int.call(null, d);
    return cljs.core.truth_(a) ? a : 1;
  }(), c = function() {
    var a = cljs.reader.parse_int.call(null, e);
    return cljs.core.truth_(a) ? a : 1;
  }(), p = function() {
    var a = cljs.reader.parse_int.call(null, f);
    return cljs.core.truth_(a) ? a : 0;
  }(), q = function() {
    var a = cljs.reader.parse_int.call(null, g);
    return cljs.core.truth_(a) ? a : 0;
  }(), r = function() {
    var a = cljs.reader.parse_int.call(null, h);
    return cljs.core.truth_(a) ? a : 0;
  }(), s = function() {
    var a = cljs.reader.parse_int.call(null, cljs.reader.zero_fill_right_and_truncate.call(null, k, 3));
    return cljs.core.truth_(a) ? a : 0;
  }(), l = cljs.core._EQ_.call(null, l, "-") ? -1 : 1, t = function() {
    var a = cljs.reader.parse_int.call(null, m);
    return cljs.core.truth_(a) ? a : 0;
  }(), v = function() {
    var a = cljs.reader.parse_int.call(null, n);
    return cljs.core.truth_(a) ? a : 0;
  }(), l = l * (60 * t + v);
  return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, cljs.reader.check.call(null, 1, b, 12, "timestamp month field must be in range 1..12"), cljs.reader.check.call(null, 1, c, cljs.reader.days_in_month.call(null, b, cljs.reader.leap_year_QMARK_.call(null, a)), "timestamp day field must be in range 1..last day in month"), cljs.reader.check.call(null, 0, p, 23, "timestamp hour field must be in range 0..23"), cljs.reader.check.call(null, 0, q, 59, "timestamp minute field must be in range 0..59"), 
  cljs.reader.check.call(null, 0, r, cljs.core._EQ_.call(null, q, 59) ? 60 : 59, "timestamp second field must be in range 0..60"), cljs.reader.check.call(null, 0, s, 999, "timestamp millisecond field must be in range 0..999"), l], null);
};
cljs.reader.parse_timestamp = function(a) {
  var b = cljs.reader.parse_and_validate_timestamp.call(null, a);
  if (cljs.core.truth_(b)) {
    a = cljs.core.nth.call(null, b, 0, null);
    var c = cljs.core.nth.call(null, b, 1, null), d = cljs.core.nth.call(null, b, 2, null), e = cljs.core.nth.call(null, b, 3, null), f = cljs.core.nth.call(null, b, 4, null), g = cljs.core.nth.call(null, b, 5, null), h = cljs.core.nth.call(null, b, 6, null), b = cljs.core.nth.call(null, b, 7, null);
    return new Date(Date.UTC(a, c - 1, d, e, f, g, h) - 6E4 * b);
  }
  return cljs.reader.reader_error.call(null, null, [cljs.core.str("Unrecognized date/time syntax: "), cljs.core.str(a)].join(""));
};
cljs.reader.read_date = function(a) {
  return "string" === typeof a ? cljs.reader.parse_timestamp.call(null, a) : cljs.reader.reader_error.call(null, null, "Instance literal expects a string for its timestamp.");
};
cljs.reader.read_queue = function(a) {
  return cljs.core.vector_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.PersistentQueue.EMPTY, a) : cljs.reader.reader_error.call(null, null, "Queue literal expects a vector for its elements.");
};
cljs.reader.read_js = function(a) {
  if (cljs.core.vector_QMARK_.call(null, a)) {
    var b = [];
    a = cljs.core.seq.call(null, a);
    for (var c = null, d = 0, e = 0;;) {
      if (e < d) {
        var f = cljs.core._nth.call(null, c, e);
        b.push(f);
        e += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), b.push(a), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
        } else {
          break;
        }
      }
    }
    return b;
  }
  if (cljs.core.map_QMARK_.call(null, a)) {
    b = {};
    a = cljs.core.seq.call(null, a);
    c = null;
    for (e = d = 0;;) {
      if (e < d) {
        var g = cljs.core._nth.call(null, c, e), f = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
        b[cljs.core.name.call(null, f)] = g;
        e += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          cljs.core.chunked_seq_QMARK_.call(null, a) ? (d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, a), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), b[cljs.core.name.call(null, c)] = d, a = cljs.core.next.call(null, a), c = null, d = 0), e = 0;
        } else {
          break;
        }
      }
    }
    return b;
  }
  return new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.reader.reader_error.call(null, null, [cljs.core.str("JS literal expects a vector or map containing "), cljs.core.str("only string or unqualified keyword keys")].join("")) : null;
};
cljs.reader.read_uuid = function(a) {
  return "string" === typeof a ? new cljs.core.UUID(a) : cljs.reader.reader_error.call(null, null, "UUID literal expects a string as its representation.");
};
cljs.reader._STAR_tag_table_STAR_ = cljs.core.atom.call(null, new cljs.core.PersistentArrayMap(null, 4, ["inst", cljs.reader.read_date, "uuid", cljs.reader.read_uuid, "queue", cljs.reader.read_queue, "js", cljs.reader.read_js], null));
cljs.reader._STAR_default_data_reader_fn_STAR_ = cljs.core.atom.call(null, null);
cljs.reader.maybe_read_tagged_type = function(a, b) {
  var c = cljs.reader.read_symbol.call(null, a, b), d = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), "" + cljs.core.str(c)), e = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
  return cljs.core.truth_(d) ? d.call(null, cljs.reader.read.call(null, a, !0, null, !1)) : cljs.core.truth_(e) ? e.call(null, c, cljs.reader.read.call(null, a, !0, null, !1)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.reader.reader_error.call(null, a, "Could not find tag parser for ", "" + cljs.core.str(c), " in ", cljs.core.pr_str.call(null, cljs.core.keys.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_)))) : null;
};
cljs.reader.register_tag_parser_BANG_ = function(a, b) {
  var c = "" + cljs.core.str(a), d = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), c);
  cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.assoc, c, b);
  return d;
};
cljs.reader.deregister_tag_parser_BANG_ = function(a) {
  a = "" + cljs.core.str(a);
  var b = cljs.core.get.call(null, cljs.core.deref.call(null, cljs.reader._STAR_tag_table_STAR_), a);
  cljs.core.swap_BANG_.call(null, cljs.reader._STAR_tag_table_STAR_, cljs.core.dissoc, a);
  return b;
};
cljs.reader.register_default_tag_parser_BANG_ = function(a) {
  var b = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
  cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(b) {
    return a;
  });
  return b;
};
cljs.reader.deregister_default_tag_parser_BANG_ = function() {
  var a = cljs.core.deref.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_);
  cljs.core.swap_BANG_.call(null, cljs.reader._STAR_default_data_reader_fn_STAR_, function(a) {
    return null;
  });
  return a;
};
lt.objs.cache = {};
lt.objs.cache.cache_path = lt.objs.files.lt_user_dir.call(null, "ltcache");
lt.objs.cache.settings_path = "" + cljs.core.str(lt.objs.files.lt_user_dir.call(null, "ltcache/default.clj"));
lt.objs.cache.settings = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.cache.on_disk = function(a) {
  return lt.objs.files.open.call(null, lt.objs.cache.settings_path, function(b) {
    return cljs.core.empty_QMARK_.call(null, b) ? a.call(null, cljs.core.PersistentArrayMap.EMPTY) : a.call(null, cljs.reader.read_string.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(b)));
  });
};
lt.objs.cache.save = function() {
  return lt.objs.cache.on_disk.call(null, function(a) {
    a = cljs.core.merge.call(null, a, cljs.core.deref.call(null, lt.objs.cache.settings));
    lt.objs.files.save.call(null, lt.objs.cache.settings_path, cljs.core.pr_str.call(null, a));
    return cljs.core.reset_BANG_.call(null, lt.objs.cache.settings, a);
  });
};
lt.objs.cache.fetch = function(a) {
  return cljs.core.deref.call(null, lt.objs.cache.settings).call(null, a);
};
lt.objs.cache.store_BANG_ = function(a, b) {
  cljs.core.swap_BANG_.call(null, lt.objs.cache.settings, cljs.core.assoc, a, b);
  return lt.objs.cache.save.call(null);
};
lt.objs.cache.store_in_BANG_ = function(a, b) {
  cljs.core.swap_BANG_.call(null, lt.objs.cache.settings, cljs.core.assoc_in, a, b);
  return lt.objs.cache.save.call(null);
};
lt.objs.cache.init = function() {
  return lt.objs.cache.on_disk.call(null, function(a) {
    return cljs.core.swap_BANG_.call(null, lt.objs.cache.settings, cljs.core.merge, a);
  });
};
lt.objs.cache.__BEH__init = function(a) {
  cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.cache.cache_path)) || lt.objs.files.mkdir.call(null, lt.objs.cache.cache_path);
  return lt.objs.cache.init.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.cache", "init", "lt.objs.cache/init", 4024902129), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.cache.__BEH__init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "deploy", "deploy", 3973538905), null], null), null));
lt.object.tag_behaviors.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.cache", "init", "lt.objs.cache/init", 4024902129)], null));
goog.Uri = function(a, b) {
  var c;
  a instanceof goog.Uri ? (this.ignoreCase_ = goog.isDef(b) ? b : a.getIgnoreCase(), this.setScheme(a.getScheme()), this.setUserInfo(a.getUserInfo()), this.setDomain(a.getDomain()), this.setPort(a.getPort()), this.setPath(a.getPath()), this.setQueryData(a.getQueryData().clone()), this.setFragment(a.getFragment())) : a && (c = goog.uri.utils.split(String(a))) ? (this.ignoreCase_ = !!b, this.setScheme(c[goog.uri.utils.ComponentIndex.SCHEME] || "", !0), this.setUserInfo(c[goog.uri.utils.ComponentIndex.USER_INFO] || 
  "", !0), this.setDomain(c[goog.uri.utils.ComponentIndex.DOMAIN] || "", !0), this.setPort(c[goog.uri.utils.ComponentIndex.PORT]), this.setPath(c[goog.uri.utils.ComponentIndex.PATH] || "", !0), this.setQueryData(c[goog.uri.utils.ComponentIndex.QUERY_DATA] || "", !0), this.setFragment(c[goog.uri.utils.ComponentIndex.FRAGMENT] || "", !0)) : (this.ignoreCase_ = !!b, this.queryData_ = new goog.Uri.QueryData(null, null, this.ignoreCase_));
};
goog.Uri.preserveParameterTypesCompatibilityFlag = !1;
goog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;
goog.Uri.prototype.scheme_ = "";
goog.Uri.prototype.userInfo_ = "";
goog.Uri.prototype.domain_ = "";
goog.Uri.prototype.port_ = null;
goog.Uri.prototype.path_ = "";
goog.Uri.prototype.fragment_ = "";
goog.Uri.prototype.isReadOnly_ = !1;
goog.Uri.prototype.ignoreCase_ = !1;
goog.Uri.prototype.toString = function() {
  var a = [], b = this.getScheme();
  b && a.push(goog.Uri.encodeSpecialChars_(b, goog.Uri.reDisallowedInSchemeOrUserInfo_), ":");
  if (b = this.getDomain()) {
    a.push("//");
    var c = this.getUserInfo();
    c && a.push(goog.Uri.encodeSpecialChars_(c, goog.Uri.reDisallowedInSchemeOrUserInfo_), "@");
    a.push(goog.string.urlEncode(b));
    b = this.getPort();
    null != b && a.push(":", String(b));
  }
  if (b = this.getPath()) {
    this.hasDomain() && "/" != b.charAt(0) && a.push("/"), a.push(goog.Uri.encodeSpecialChars_(b, "/" == b.charAt(0) ? goog.Uri.reDisallowedInAbsolutePath_ : goog.Uri.reDisallowedInRelativePath_));
  }
  (b = this.getEncodedQuery()) && a.push("?", b);
  (b = this.getFragment()) && a.push("#", goog.Uri.encodeSpecialChars_(b, goog.Uri.reDisallowedInFragment_));
  return a.join("");
};
goog.Uri.prototype.resolve = function(a) {
  var b = this.clone(), c = a.hasScheme();
  c ? b.setScheme(a.getScheme()) : c = a.hasUserInfo();
  c ? b.setUserInfo(a.getUserInfo()) : c = a.hasDomain();
  c ? b.setDomain(a.getDomain()) : c = a.hasPort();
  var d = a.getPath();
  if (c) {
    b.setPort(a.getPort());
  } else {
    if (c = a.hasPath()) {
      if ("/" != d.charAt(0)) {
        if (this.hasDomain() && !this.hasPath()) {
          d = "/" + d;
        } else {
          var e = b.getPath().lastIndexOf("/");
          -1 != e && (d = b.getPath().substr(0, e + 1) + d);
        }
      }
      d = goog.Uri.removeDotSegments(d);
    }
  }
  c ? b.setPath(d) : c = a.hasQuery();
  c ? b.setQueryData(a.getDecodedQuery()) : c = a.hasFragment();
  c && b.setFragment(a.getFragment());
  return b;
};
goog.Uri.prototype.clone = function() {
  return new goog.Uri(this);
};
goog.Uri.prototype.getScheme = function() {
  return this.scheme_;
};
goog.Uri.prototype.setScheme = function(a, b) {
  this.enforceReadOnly();
  if (this.scheme_ = b ? goog.Uri.decodeOrEmpty_(a) : a) {
    this.scheme_ = this.scheme_.replace(/:$/, "");
  }
  return this;
};
goog.Uri.prototype.hasScheme = function() {
  return!!this.scheme_;
};
goog.Uri.prototype.getUserInfo = function() {
  return this.userInfo_;
};
goog.Uri.prototype.setUserInfo = function(a, b) {
  this.enforceReadOnly();
  this.userInfo_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
  return this;
};
goog.Uri.prototype.hasUserInfo = function() {
  return!!this.userInfo_;
};
goog.Uri.prototype.getDomain = function() {
  return this.domain_;
};
goog.Uri.prototype.setDomain = function(a, b) {
  this.enforceReadOnly();
  this.domain_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
  return this;
};
goog.Uri.prototype.hasDomain = function() {
  return!!this.domain_;
};
goog.Uri.prototype.getPort = function() {
  return this.port_;
};
goog.Uri.prototype.setPort = function(a) {
  this.enforceReadOnly();
  if (a) {
    a = Number(a);
    if (isNaN(a) || 0 > a) {
      throw Error("Bad port number " + a);
    }
    this.port_ = a;
  } else {
    this.port_ = null;
  }
  return this;
};
goog.Uri.prototype.hasPort = function() {
  return null != this.port_;
};
goog.Uri.prototype.getPath = function() {
  return this.path_;
};
goog.Uri.prototype.setPath = function(a, b) {
  this.enforceReadOnly();
  this.path_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
  return this;
};
goog.Uri.prototype.hasPath = function() {
  return!!this.path_;
};
goog.Uri.prototype.hasQuery = function() {
  return "" !== this.queryData_.toString();
};
goog.Uri.prototype.setQueryData = function(a, b) {
  this.enforceReadOnly();
  a instanceof goog.Uri.QueryData ? (this.queryData_ = a, this.queryData_.setIgnoreCase(this.ignoreCase_)) : (b || (a = goog.Uri.encodeSpecialChars_(a, goog.Uri.reDisallowedInQuery_)), this.queryData_ = new goog.Uri.QueryData(a, null, this.ignoreCase_));
  return this;
};
goog.Uri.prototype.setQuery = function(a, b) {
  return this.setQueryData(a, b);
};
goog.Uri.prototype.getEncodedQuery = function() {
  return this.queryData_.toString();
};
goog.Uri.prototype.getDecodedQuery = function() {
  return this.queryData_.toDecodedString();
};
goog.Uri.prototype.getQueryData = function() {
  return this.queryData_;
};
goog.Uri.prototype.getQuery = function() {
  return this.getEncodedQuery();
};
goog.Uri.prototype.setParameterValue = function(a, b) {
  this.enforceReadOnly();
  this.queryData_.set(a, b);
  return this;
};
goog.Uri.prototype.setParameterValues = function(a, b) {
  this.enforceReadOnly();
  goog.isArray(b) || (b = [String(b)]);
  this.queryData_.setValues(a, b);
  return this;
};
goog.Uri.prototype.getParameterValues = function(a) {
  return this.queryData_.getValues(a);
};
goog.Uri.prototype.getParameterValue = function(a) {
  return this.queryData_.get(a);
};
goog.Uri.prototype.getFragment = function() {
  return this.fragment_;
};
goog.Uri.prototype.setFragment = function(a, b) {
  this.enforceReadOnly();
  this.fragment_ = b ? goog.Uri.decodeOrEmpty_(a) : a;
  return this;
};
goog.Uri.prototype.hasFragment = function() {
  return!!this.fragment_;
};
goog.Uri.prototype.hasSameDomainAs = function(a) {
  return(!this.hasDomain() && !a.hasDomain() || this.getDomain() == a.getDomain()) && (!this.hasPort() && !a.hasPort() || this.getPort() == a.getPort());
};
goog.Uri.prototype.makeUnique = function() {
  this.enforceReadOnly();
  this.setParameterValue(goog.Uri.RANDOM_PARAM, goog.string.getRandomString());
  return this;
};
goog.Uri.prototype.removeParameter = function(a) {
  this.enforceReadOnly();
  this.queryData_.remove(a);
  return this;
};
goog.Uri.prototype.setReadOnly = function(a) {
  this.isReadOnly_ = a;
  return this;
};
goog.Uri.prototype.isReadOnly = function() {
  return this.isReadOnly_;
};
goog.Uri.prototype.enforceReadOnly = function() {
  if (this.isReadOnly_) {
    throw Error("Tried to modify a read-only Uri");
  }
};
goog.Uri.prototype.setIgnoreCase = function(a) {
  this.ignoreCase_ = a;
  this.queryData_ && this.queryData_.setIgnoreCase(a);
  return this;
};
goog.Uri.prototype.getIgnoreCase = function() {
  return this.ignoreCase_;
};
goog.Uri.parse = function(a, b) {
  return a instanceof goog.Uri ? a.clone() : new goog.Uri(a, b);
};
goog.Uri.create = function(a, b, c, d, e, f, g, h) {
  h = new goog.Uri(null, h);
  a && h.setScheme(a);
  b && h.setUserInfo(b);
  c && h.setDomain(c);
  d && h.setPort(d);
  e && h.setPath(e);
  f && h.setQueryData(f);
  g && h.setFragment(g);
  return h;
};
goog.Uri.resolve = function(a, b) {
  a instanceof goog.Uri || (a = goog.Uri.parse(a));
  b instanceof goog.Uri || (b = goog.Uri.parse(b));
  return a.resolve(b);
};
goog.Uri.removeDotSegments = function(a) {
  if (".." == a || "." == a) {
    return "";
  }
  if (goog.string.contains(a, "./") || goog.string.contains(a, "/.")) {
    var b = goog.string.startsWith(a, "/");
    a = a.split("/");
    for (var c = [], d = 0;d < a.length;) {
      var e = a[d++];
      "." == e ? b && d == a.length && c.push("") : ".." == e ? ((1 < c.length || 1 == c.length && "" != c[0]) && c.pop(), b && d == a.length && c.push("")) : (c.push(e), b = !0);
    }
    return c.join("/");
  }
  return a;
};
goog.Uri.decodeOrEmpty_ = function(a) {
  return a ? decodeURIComponent(a) : "";
};
goog.Uri.encodeSpecialChars_ = function(a, b) {
  return goog.isString(a) ? encodeURI(a).replace(b, goog.Uri.encodeChar_) : null;
};
goog.Uri.encodeChar_ = function(a) {
  a = a.charCodeAt(0);
  return "%" + (a >> 4 & 15).toString(16) + (a & 15).toString(16);
};
goog.Uri.reDisallowedInSchemeOrUserInfo_ = /[#\/\?@]/g;
goog.Uri.reDisallowedInRelativePath_ = /[\#\?:]/g;
goog.Uri.reDisallowedInAbsolutePath_ = /[\#\?]/g;
goog.Uri.reDisallowedInQuery_ = /[\#\?@]/g;
goog.Uri.reDisallowedInFragment_ = /#/g;
goog.Uri.haveSameDomain = function(a, b) {
  var c = goog.uri.utils.split(a), d = goog.uri.utils.split(b);
  return c[goog.uri.utils.ComponentIndex.DOMAIN] == d[goog.uri.utils.ComponentIndex.DOMAIN] && c[goog.uri.utils.ComponentIndex.PORT] == d[goog.uri.utils.ComponentIndex.PORT];
};
goog.Uri.QueryData = function(a, b, c) {
  this.encodedQuery_ = a || null;
  this.ignoreCase_ = !!c;
};
goog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {
  if (!this.keyMap_ && (this.keyMap_ = new goog.structs.Map, this.count_ = 0, this.encodedQuery_)) {
    for (var a = this.encodedQuery_.split("\x26"), b = 0;b < a.length;b++) {
      var c = a[b].indexOf("\x3d"), d = null, e = null;
      0 <= c ? (d = a[b].substring(0, c), e = a[b].substring(c + 1)) : d = a[b];
      d = goog.string.urlDecode(d);
      d = this.getKeyName_(d);
      this.add(d, e ? goog.string.urlDecode(e) : "");
    }
  }
};
goog.Uri.QueryData.createFromMap = function(a, b, c) {
  b = goog.structs.getKeys(a);
  if ("undefined" == typeof b) {
    throw Error("Keys are undefined");
  }
  c = new goog.Uri.QueryData(null, null, c);
  a = goog.structs.getValues(a);
  for (var d = 0;d < b.length;d++) {
    var e = b[d], f = a[d];
    goog.isArray(f) ? c.setValues(e, f) : c.add(e, f);
  }
  return c;
};
goog.Uri.QueryData.createFromKeysValues = function(a, b, c, d) {
  if (a.length != b.length) {
    throw Error("Mismatched lengths for keys/values");
  }
  c = new goog.Uri.QueryData(null, null, d);
  for (d = 0;d < a.length;d++) {
    c.add(a[d], b[d]);
  }
  return c;
};
goog.Uri.QueryData.prototype.keyMap_ = null;
goog.Uri.QueryData.prototype.count_ = null;
goog.Uri.QueryData.prototype.getCount = function() {
  this.ensureKeyMapInitialized_();
  return this.count_;
};
goog.Uri.QueryData.prototype.add = function(a, b) {
  this.ensureKeyMapInitialized_();
  this.invalidateCache_();
  a = this.getKeyName_(a);
  var c = this.keyMap_.get(a);
  c || this.keyMap_.set(a, c = []);
  c.push(b);
  this.count_++;
  return this;
};
goog.Uri.QueryData.prototype.remove = function(a) {
  this.ensureKeyMapInitialized_();
  a = this.getKeyName_(a);
  return this.keyMap_.containsKey(a) ? (this.invalidateCache_(), this.count_ -= this.keyMap_.get(a).length, this.keyMap_.remove(a)) : !1;
};
goog.Uri.QueryData.prototype.clear = function() {
  this.invalidateCache_();
  this.keyMap_ = null;
  this.count_ = 0;
};
goog.Uri.QueryData.prototype.isEmpty = function() {
  this.ensureKeyMapInitialized_();
  return 0 == this.count_;
};
goog.Uri.QueryData.prototype.containsKey = function(a) {
  this.ensureKeyMapInitialized_();
  a = this.getKeyName_(a);
  return this.keyMap_.containsKey(a);
};
goog.Uri.QueryData.prototype.containsValue = function(a) {
  var b = this.getValues();
  return goog.array.contains(b, a);
};
goog.Uri.QueryData.prototype.getKeys = function() {
  this.ensureKeyMapInitialized_();
  for (var a = this.keyMap_.getValues(), b = this.keyMap_.getKeys(), c = [], d = 0;d < b.length;d++) {
    for (var e = a[d], f = 0;f < e.length;f++) {
      c.push(b[d]);
    }
  }
  return c;
};
goog.Uri.QueryData.prototype.getValues = function(a) {
  this.ensureKeyMapInitialized_();
  var b = [];
  if (a) {
    this.containsKey(a) && (b = goog.array.concat(b, this.keyMap_.get(this.getKeyName_(a))));
  } else {
    a = this.keyMap_.getValues();
    for (var c = 0;c < a.length;c++) {
      b = goog.array.concat(b, a[c]);
    }
  }
  return b;
};
goog.Uri.QueryData.prototype.set = function(a, b) {
  this.ensureKeyMapInitialized_();
  this.invalidateCache_();
  a = this.getKeyName_(a);
  this.containsKey(a) && (this.count_ -= this.keyMap_.get(a).length);
  this.keyMap_.set(a, [b]);
  this.count_++;
  return this;
};
goog.Uri.QueryData.prototype.get = function(a, b) {
  var c = a ? this.getValues(a) : [];
  return goog.Uri.preserveParameterTypesCompatibilityFlag ? 0 < c.length ? c[0] : b : 0 < c.length ? String(c[0]) : b;
};
goog.Uri.QueryData.prototype.setValues = function(a, b) {
  this.remove(a);
  0 < b.length && (this.invalidateCache_(), this.keyMap_.set(this.getKeyName_(a), goog.array.clone(b)), this.count_ += b.length);
};
goog.Uri.QueryData.prototype.toString = function() {
  if (this.encodedQuery_) {
    return this.encodedQuery_;
  }
  if (!this.keyMap_) {
    return "";
  }
  for (var a = [], b = this.keyMap_.getKeys(), c = 0;c < b.length;c++) {
    for (var d = b[c], e = goog.string.urlEncode(d), d = this.getValues(d), f = 0;f < d.length;f++) {
      var g = e;
      "" !== d[f] && (g += "\x3d" + goog.string.urlEncode(d[f]));
      a.push(g);
    }
  }
  return this.encodedQuery_ = a.join("\x26");
};
goog.Uri.QueryData.prototype.toDecodedString = function() {
  return goog.Uri.decodeOrEmpty_(this.toString());
};
goog.Uri.QueryData.prototype.invalidateCache_ = function() {
  this.encodedQuery_ = null;
};
goog.Uri.QueryData.prototype.filterKeys = function(a) {
  this.ensureKeyMapInitialized_();
  goog.structs.forEach(this.keyMap_, function(b, c, d) {
    goog.array.contains(a, c) || this.remove(c);
  }, this);
  return this;
};
goog.Uri.QueryData.prototype.clone = function() {
  var a = new goog.Uri.QueryData;
  a.encodedQuery_ = this.encodedQuery_;
  this.keyMap_ && (a.keyMap_ = this.keyMap_.clone(), a.count_ = this.count_);
  return a;
};
goog.Uri.QueryData.prototype.getKeyName_ = function(a) {
  a = String(a);
  this.ignoreCase_ && (a = a.toLowerCase());
  return a;
};
goog.Uri.QueryData.prototype.setIgnoreCase = function(a) {
  a && !this.ignoreCase_ && (this.ensureKeyMapInitialized_(), this.invalidateCache_(), goog.structs.forEach(this.keyMap_, function(a, c) {
    var d = c.toLowerCase();
    c != d && (this.remove(c), this.setValues(d, a));
  }, this));
  this.ignoreCase_ = a;
};
goog.Uri.QueryData.prototype.extend = function(a) {
  for (var b = 0;b < arguments.length;b++) {
    goog.structs.forEach(arguments[b], function(a, b) {
      this.add(b, a);
    }, this);
  }
};
var fetch = {core:{}};
fetch.core.__GT_method = function(a) {
  return clojure.string.upper_case.call(null, cljs.core.name.call(null, a));
};
fetch.core.parse_route = function(a) {
  if ("string" === typeof a) {
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["GET", a], null);
  }
  if (cljs.core.vector_QMARK_.call(null, a)) {
    var b = cljs.core.nth.call(null, a, 0, null);
    a = cljs.core.nth.call(null, a, 1, null);
    return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [fetch.core.__GT_method.call(null, b), a], null);
  }
  return new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["GET", a], null) : null;
};
fetch.core.__GT_data = function(a) {
  a = cljs.core.clj__GT_js.call(null, a);
  a = goog.Uri.QueryData.createFromMap(new goog.structs.Map(a));
  return "" + cljs.core.str(a);
};
fetch.core.__GT_callback = function(a) {
  return cljs.core.truth_(a) ? function(b) {
    b = b.getResponseText();
    return a.call(null, b);
  } : null;
};
fetch.core.xhr = function() {
  var a = function(a, b, e, f) {
    f = cljs.core.nth.call(null, f, 0, null);
    var g = new goog.net.XhrIo, h = fetch.core.parse_route.call(null, a);
    a = cljs.core.nth.call(null, h, 0, null);
    h = cljs.core.nth.call(null, h, 1, null);
    b = fetch.core.__GT_data.call(null, b);
    var k = fetch.core.__GT_callback.call(null, e);
    cljs.core.truth_(k) && goog.events.listen(g, goog.net.EventType.COMPLETE, function() {
      return k.call(null, g);
    });
    return g.send(h, a, b, cljs.core.truth_(f) ? cljs.core.clj__GT_js.call(null, f) : null);
  }, b = function(b, d, e, f) {
    var g = null;
    3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
    return a.call(this, b, d, e, g);
  };
  b.cljs$lang$maxFixedArity = 3;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.next(b);
    var f = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, f, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
fetch.remotes = {};
fetch.remotes.remote_uri = "/_fetch";
fetch.remotes.remote_callback = function(a, b, c) {
  return fetch.core.xhr.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "post", "post", 1017351186), fetch.remotes.remote_uri], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "remote", "remote", 4374260664), a, new cljs.core.Keyword(null, "params", "params", 4313443576), cljs.core.pr_str.call(null, b)], null), cljs.core.truth_(c) ? function(a) {
    a = cljs.core._EQ_.call(null, a, "") ? "nil" : a;
    return c.call(null, cljs.reader.read_string.call(null, a));
  } : null);
};
lt.objs.metrics = {};
lt.objs.metrics.server_url = "http://app.kodowa.com";
fetch.remotes.remote_uri = [cljs.core.str(lt.objs.metrics.server_url), cljs.core.str("/_fetch")].join("");
lt.objs.metrics.active_QMARK_ = !0;
lt.objs.metrics.used_QMARK_ = !1;
lt.objs.metrics._metrics = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
lt.objs.metrics.metric_rate = 3E4;
lt.objs.metrics.used_BANG_ = function() {
  return lt.objs.metrics.used_QMARK_ = !0;
};
lt.objs.metrics.capture_BANG_ = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "ev", "ev", 1013907491), a, new cljs.core.Keyword(null, "ts", "ts", 1013907953), lt.util.js.now.call(null)], null), e = cljs.core.truth_(e) ? cljs.core.assoc.call(null, f, new cljs.core.Keyword(null, "ex", "ex", 1013907493), e) : f;
    return cljs.core.swap_BANG_.call(null, lt.objs.metrics._metrics, cljs.core.conj, e);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.metrics.send = function(a) {
  return fetch.remotes.remote_callback.call(null, "metrics!", new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, lt.objs.cache.fetch.call(null, new cljs.core.Keyword(null, "uid", "uid", 1014020034))], null), null);
};
lt.objs.metrics.flush = function() {
  if (cljs.core.truth_(lt.objs.metrics.active_QMARK_)) {
    var a = cljs.core.seq.call(null, cljs.core.deref.call(null, lt.objs.metrics._metrics));
    if (a) {
      return cljs.core.reset_BANG_.call(null, lt.objs.metrics._metrics, cljs.core.PersistentVector.EMPTY), lt.objs.metrics.send.call(null, a);
    }
  }
  return null;
};
lt.objs.metrics.init = function() {
  cljs.core.truth_(lt.objs.cache.fetch.call(null, new cljs.core.Keyword(null, "no-metrics", "no-metrics", 4181152809))) && (lt.objs.metrics.active_QMARK_ = !1);
  return cljs.core.truth_(lt.objs.metrics.active_QMARK_) ? (fetch.remotes.remote_callback.call(null, "session", cljs.core.PersistentVector.EMPTY, function(a) {
    cljs.core.truth_(lt.objs.cache.fetch.call(null, new cljs.core.Keyword(null, "uid", "uid", 1014020034))) || lt.objs.cache.store_BANG_.call(null, new cljs.core.Keyword(null, "uid", "uid", 1014020034), a);
    lt.objs.metrics.capture_BANG_.call(null, new cljs.core.Keyword(null, "session-created", "session-created", 2199511587));
    return lt.util.js.every.call(null, lt.objs.metrics.metric_rate, lt.objs.metrics.flush);
  }), lt.util.js.every.call(null, 6E4, function() {
    return cljs.core.truth_(lt.objs.metrics.used_QMARK_) ? (lt.objs.metrics.used_QMARK_ = !1, lt.objs.metrics.capture_BANG_.call(null, new cljs.core.Keyword(null, "metrics.minute", "metrics.minute", 3221073169))) : null;
  })) : null;
};
lt.objs.metrics.__BEH__init_metrics = function() {
  return lt.objs.metrics.init.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.metrics", "init-metrics", "lt.objs.metrics/init-metrics", 3820315356), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.metrics.__BEH__init_metrics, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.metrics.__BEH__disable_metrics = function(a) {
  return lt.objs.metrics.active_QMARK_ = !1;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.metrics", "disable-metrics", "lt.objs.metrics/disable-metrics", 3662334164), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.metrics.__BEH__disable_metrics, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Disable metrics", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.util.events = {};
lt.util.events.capture = function() {
  var a = null, b = function(b, c) {
    return a.call(null, document, b, c);
  }, c = function(a, b, c) {
    return a.addEventListener(cljs.core.name.call(null, b), c, !0);
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
lt.objs.keyboard = {};
lt.objs.keyboard.capturing_QMARK_ = !0;
lt.objs.keyboard.keys = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.keyboard.key_map = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.keyboard.chords = function() {
  return{current:null, chords:cljs.core.PersistentHashSet.EMPTY};
}();
lt.objs.keyboard.chord_timeout = 1E3;
lt.objs.keyboard.activity = function() {
  return lt.objs.metrics.used_BANG_.call(null);
};
lt.objs.keyboard.chord_variants = function(a) {
  a = cljs.core.butlast.call(null, clojure.string.split.call(null, a, " "));
  return cljs.core.reduce.call(null, function(a, c) {
    return cljs.core.conj.call(null, a, [cljs.core.str(cljs.core.last.call(null, a)), cljs.core.str(" "), cljs.core.str(c)].join(""));
  }, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.first.call(null, a)], null), cljs.core.rest.call(null, a));
};
lt.objs.keyboard.extract_chords = function(a) {
  return cljs.core.reduce.call(null, function(a, c) {
    var d = cljs.core.nth.call(null, c, 0, null);
    cljs.core.nth.call(null, c, 1, null);
    return-1 < d.indexOf(" ") ? cljs.core.apply.call(null, cljs.core.conj, a, lt.objs.keyboard.chord_variants.call(null, d)) : a;
  }, cljs.core.PersistentHashSet.EMPTY, a);
};
lt.objs.keyboard.merge_keys = function(a) {
  a = lt.object.specificity_sort.call(null, a, new cljs.core.Keyword(null, "down", "down", 1016993812));
  var b = cljs.core.deref.call(null, lt.objs.keyboard.keys);
  a = cljs.core.apply.call(null, cljs.core.merge, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, b, a));
  var b = lt.objs.keyboard, c = {current:null, chords:lt.objs.keyboard.extract_chords.call(null, a)};
  b.chords = c;
  cljs.core.reset_BANG_.call(null, lt.objs.keyboard.key_map, a);
  return lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "app.keys.change", "app.keys.change", 1612622863));
};
lt.objs.keyboard.refresh = function() {
  return lt.objs.keyboard.merge_keys.call(null, lt.objs.context.current.call(null));
};
cljs.core.add_watch.call(null, lt.objs.context.contexts, new cljs.core.Keyword(null, "commands2", "commands2", 3810146844), function(a, b, c, d) {
  return lt.objs.keyboard.merge_keys.call(null, d);
});
lt.objs.keyboard.refresh.call(null);
lt.objs.keyboard.__GT_keystr = function(a, b) {
  return[cljs.core.str(cljs.core.truth_(b.ctrlKey) ? "ctrl-" : null), cljs.core.str(cljs.core.truth_(b.metaKey) ? lt.objs.platform.mac_QMARK_.call(null) ? "cmd-" : "meta-" : null), cljs.core.str(cljs.core.truth_(b.altKey) ? "alt-" : null), cljs.core.str(cljs.core.truth_(b.altGraphKey) ? "altgr-" : null), cljs.core.str(cljs.core.truth_(b.shiftKey) ? "shift-" : null), cljs.core.str((cljs.core.truth_(a) ? a : "").toLowerCase())].join("");
};
lt.objs.keyboard.chord_BAR_mapping = function(a, b, c) {
  var d = lt.objs.keyboard.chords.current, e = lt.objs.keyboard.chords.chords;
  a = cljs.core.truth_(d) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [[cljs.core.str(d), cljs.core.str(" "), cljs.core.str(lt.objs.keyboard.__GT_keystr.call(null, a, c))].join(""), [cljs.core.str(d), cljs.core.str(" "), cljs.core.str(b)].join("")], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.keyboard.__GT_keystr.call(null, a, c), b], null);
  var f = cljs.core.nth.call(null, a, 0, null), g = cljs.core.nth.call(null, a, 1, null);
  a = function() {
    var a = e.call(null, g);
    return cljs.core.truth_(a) ? a : e.call(null, f);
  }();
  if (cljs.core.truth_(a)) {
    return lt.objs.keyboard.chords.current = a, cljs.core.truth_(lt.objs.keyboard.chord_timeout) && lt.util.js.wait.call(null, lt.objs.keyboard.chord_timeout, function() {
      return lt.objs.keyboard.chords.current = null;
    }), cljs.core.PersistentVector.EMPTY;
  }
  lt.objs.keyboard.chords.current = null;
  a = cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, g);
  if (cljs.core.truth_(a)) {
    return a;
  }
  a = cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, f);
  return cljs.core.truth_(a) ? a : cljs.core.truth_(d) ? cljs.core.PersistentVector.EMPTY : null;
};
lt.objs.keyboard._STAR_capture_STAR_ = !0;
lt.objs.keyboard._STAR_stop_STAR_ = !1;
lt.objs.keyboard.passthrough = function() {
  return lt.objs.keyboard._STAR_capture_STAR_ = !1;
};
lt.objs.keyboard.stop_commands_BANG_ = function() {
  return lt.objs.keyboard._STAR_stop_STAR_ = !0;
};
lt.objs.keyboard.disable = function() {
  return lt.objs.keyboard.capturing_QMARK_ = !1;
};
lt.objs.keyboard.enable = function() {
  return lt.objs.keyboard.capturing_QMARK_ = !0;
};
lt.objs.keyboard.all_mappings = function(a) {
  return cljs.core.reduce.call(null, function(b, c) {
    var d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nth.call(null, c, 1, null);
    return cljs.core.not.call(null, e.call(null, a)) ? b : cljs.core.conj.call(null, b, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d, e.call(null, a)], null));
  }, cljs.core.PersistentVector.EMPTY, cljs.core.deref.call(null, lt.objs.keyboard.keys));
};
lt.objs.keyboard.trigger = function(a) {
  lt.objs.keyboard.activity.call(null);
  cljs.core.coll_QMARK_.call(null, a) ? cljs.core.apply.call(null, lt.objs.command.exec_BANG_, a) : lt.objs.command.exec_BANG_.call(null, a);
  return lt.objs.keyboard._STAR_capture_STAR_;
};
lt.objs.keyboard.capture = function(a, b, c) {
  lt.objs.keyboard.activity.call(null);
  var d = lt.objs.keyboard._STAR_capture_STAR_, e = lt.objs.keyboard._STAR_stop_STAR_;
  try {
    lt.objs.keyboard._STAR_capture_STAR_ = !0;
    lt.objs.keyboard._STAR_stop_STAR_ = !1;
    var f = lt.objs.keyboard.chord_BAR_mapping.call(null, a, b, c);
    if (cljs.core.truth_(f)) {
      var g = cljs.core.seq.call(null, f);
      a = null;
      for (c = b = 0;;) {
        if (c < b) {
          var h = cljs.core._nth.call(null, a, c);
          cljs.core.truth_(lt.objs.keyboard._STAR_stop_STAR_) || (lt.objs.keyboard._STAR_capture_STAR_ = !0, lt.objs.keyboard.trigger.call(null, h));
          c += 1;
        } else {
          var k = cljs.core.seq.call(null, g);
          if (k) {
            f = k;
            if (cljs.core.chunked_seq_QMARK_.call(null, f)) {
              var l = cljs.core.chunk_first.call(null, f), m = cljs.core.chunk_rest.call(null, f), f = l, n = cljs.core.count.call(null, l), g = m;
              a = f;
              b = n;
            } else {
              var p = cljs.core.first.call(null, f);
              cljs.core.truth_(lt.objs.keyboard._STAR_stop_STAR_) || (lt.objs.keyboard._STAR_capture_STAR_ = !0, lt.objs.keyboard.trigger.call(null, p));
              g = cljs.core.next.call(null, f);
              a = null;
              b = 0;
            }
            c = 0;
          } else {
            break;
          }
        }
      }
      return lt.objs.keyboard._STAR_capture_STAR_;
    }
    return null;
  } finally {
    lt.objs.keyboard._STAR_stop_STAR_ = e, lt.objs.keyboard._STAR_capture_STAR_ = d;
  }
};
lt.objs.keyboard.capture_up = function(a, b, c) {
  b = cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, b);
  return cljs.core.truth_(b) ? b : cljs.core.deref.call(null, lt.objs.keyboard.key_map).call(null, lt.objs.keyboard.__GT_keystr.call(null, a, c));
};
lt.objs.keyboard.meta = lt.objs.platform.mac_QMARK_.call(null) ? "cmd" : "ctrl";
lt.objs.keyboard.cmd__GT_bindings = function(a) {
  return cljs.core.filter.call(null, function(a) {
    return cljs.core.seq.call(null, cljs.core.second.call(null, a));
  }, function() {
    return function c(d) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, d);
          if (e) {
            var f = e;
            if (cljs.core.chunked_seq_QMARK_.call(null, f)) {
              var g = cljs.core.chunk_first.call(null, f), h = cljs.core.count.call(null, g), k = cljs.core.chunk_buffer.call(null, h);
              return function() {
                for (var c = 0;;) {
                  if (c < h) {
                    var d = cljs.core._nth.call(null, g, c), l = cljs.core.nth.call(null, d, 0, null), m = cljs.core.nth.call(null, d, 1, null);
                    cljs.core.chunk_append.call(null, k, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [l, cljs.core.first.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(c, d, e, f, g, h, k, l, m) {
                      return function(c) {
                        return cljs.core._EQ_.call(null, cljs.core.first.call(null, cljs.core.second.call(null, c)), a);
                      };
                    }(c, d, l, m, g, h, k, f, e), m)))], null));
                    c += 1;
                  } else {
                    return!0;
                  }
                }
              }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), c.call(null, cljs.core.chunk_rest.call(null, f))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), null);
            }
            var l = cljs.core.first.call(null, f), m = cljs.core.nth.call(null, l, 0, null), n = cljs.core.nth.call(null, l, 1, null);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m, cljs.core.first.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(c, d, e, f, g) {
              return function(c) {
                return cljs.core._EQ_.call(null, cljs.core.first.call(null, cljs.core.second.call(null, c)), a);
              };
            }(l, m, n, f, e), n)))], null), c.call(null, cljs.core.rest.call(null, f)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.deref.call(null, lt.objs.keyboard.keys));
  }());
};
lt.objs.keyboard.cmd__GT_current_binding = function(a) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return cljs.core.set.call(null, cljs.core.second.call(null, b)).call(null, a);
  }, cljs.core.deref.call(null, lt.objs.keyboard.key_map)));
};
Mousetrap.handleKey = function(a, b, c) {
  return cljs.core.truth_(function() {
    var d = lt.objs.keyboard.capturing_QMARK_;
    return cljs.core.truth_(d) ? (d = "string" === typeof a) ? lt.objs.keyboard.capture.call(null, a, b, c) : d : d;
  }()) ? (c.preventDefault(), c.stopPropagation()) : null;
};
Mousetrap.handleKeyUp = function(a, b, c) {
  return cljs.core.truth_(function() {
    var d = lt.objs.keyboard.capturing_QMARK_;
    return cljs.core.truth_(d) ? (d = "string" === typeof a) ? lt.objs.keyboard.capture_up.call(null, a, b, c) : d : d;
  }()) ? (c.preventDefault(), c.stopPropagation()) : null;
};
lt.objs.keyboard.__BEH__chord_timeout = function(a, b) {
  return lt.objs.keyboard.chord_timeout = b;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.keyboard", "chord-timeout", "lt.objs.keyboard/chord-timeout", 4274129831), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.keyboard.__BEH__chord_timeout, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Set the timeout for chorded shortcuts", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.menu = {};
lt.objs.menu.remote = require("remote");
lt.objs.menu.Menu = lt.objs.menu.remote.require("menu");
lt.objs.menu.MenuItem = lt.objs.menu.remote.require("menu-item");
lt.objs.menu.menu_item = function(a) {
  a = cljs.core.not.call(null, (new cljs.core.Keyword(null, "submenu", "submenu", 3441075985)).cljs$core$IFn$_invoke$arity$1(a)) ? a : cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), lt.objs.menu.submenu.call(null, (new cljs.core.Keyword(null, "submenu", "submenu", 3441075985)).cljs$core$IFn$_invoke$arity$1(a)));
  cljs.core.truth_((new cljs.core.Keyword(null, "click", "click", 1108654330)).cljs$core$IFn$_invoke$arity$1(a)) && cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    return function() {
      try {
        var c = (new cljs.core.Keyword(null, "click", "click", 1108654330)).cljs$core$IFn$_invoke$arity$1(a);
        return cljs.core.truth_(c) ? c.call(null) : null;
      } catch (d) {
        return lt.objs.console.error(d);
      }
    };
  }(a));
  return new lt.objs.menu.MenuItem(cljs.core.clj__GT_js.call(null, a));
};
lt.objs.menu.submenu = function(a) {
  var b = new lt.objs.menu.Menu;
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      cljs.core.truth_(f) && b.append(lt.objs.menu.menu_item.call(null, f));
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), cljs.core.truth_(a) && b.append(lt.objs.menu.menu_item.call(null, a)), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.menu.menu = function(a) {
  var b = new lt.objs.menu.Menu;
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      b.append(lt.objs.menu.menu_item.call(null, f));
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), b.append(lt.objs.menu.menu_item.call(null, a)), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.menu.show_menu = function(a) {
  return a.popup(lt.objs.menu.remote.getCurrentWindow());
};
lt.util.dom.on.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(a) {
  lt.util.dom.prevent.call(null, a);
  lt.util.dom.stop_propagation.call(null, a);
  return!1;
});
lt.objs.menu.set_menubar = function(a) {
  var b = new lt.objs.menu.Menu;
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      cljs.core.truth_(f) && b.append(lt.objs.menu.menu_item.call(null, f));
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = a, d = cljs.core.count.call(null, a), a = e) : (a = cljs.core.first.call(null, c), cljs.core.truth_(a) && b.append(lt.objs.menu.menu_item.call(null, a)), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return lt.objs.menu.Menu.setApplicationMenu.call(null, b);
};
lt.objs.menu.key_mappings = new cljs.core.PersistentArrayMap(null, 4, "cmd Command shift Shift ctrl Control alt Alt".split(" "), null);
lt.objs.menu.command__GT_menu_binding = function(a) {
  var b = cljs.core.first.call(null, lt.objs.keyboard.cmd__GT_current_binding.call(null, a)), c = clojure.string.split.call(null, b, " ");
  a = function() {
    return function(a, b) {
      return function g(c) {
        return new cljs.core.LazySeq(null, function(a, b) {
          return function() {
            for (;;) {
              var d = cljs.core.seq.call(null, c);
              if (d) {
                var e = d;
                if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
                  var p = cljs.core.chunk_first.call(null, e), q = cljs.core.count.call(null, p), r = cljs.core.chunk_buffer.call(null, q);
                  return function() {
                    for (var c = 0;;) {
                      if (c < q) {
                        var g = cljs.core._nth.call(null, p, c), h = function() {
                          return function(a, b, c, d, e, g, h, k, l) {
                            return function E(m) {
                              return new cljs.core.LazySeq(null, function(a, b, c, d, e, g, h, k, l) {
                                return function() {
                                  for (;;) {
                                    var a = cljs.core.seq.call(null, m);
                                    if (a) {
                                      if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                                        var b = cljs.core.chunk_first.call(null, a), c = cljs.core.count.call(null, b), d = cljs.core.chunk_buffer.call(null, c);
                                        return function() {
                                          for (var a = 0;;) {
                                            if (a < c) {
                                              var e = cljs.core._nth.call(null, b, a);
                                              cljs.core.chunk_append.call(null, d, function() {
                                                var a = lt.objs.menu.key_mappings.call(null, e);
                                                return cljs.core.truth_(a) ? a : e;
                                              }());
                                              a += 1;
                                            } else {
                                              return!0;
                                            }
                                          }
                                        }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), E.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), null);
                                      }
                                      var e = cljs.core.first.call(null, a);
                                      return cljs.core.cons.call(null, function() {
                                        var a = lt.objs.menu.key_mappings.call(null, e);
                                        return cljs.core.truth_(a) ? a : e;
                                      }(), E.call(null, cljs.core.rest.call(null, a)));
                                    }
                                    return null;
                                  }
                                };
                              }(a, b, c, d, e, g, h, k, l), null, null);
                            };
                          }(c, g, p, q, r, e, d, a, b).call(null, clojure.string.split.call(null, g, "-"));
                        }();
                        cljs.core.chunk_append.call(null, r, clojure.string.join.call(null, "+", h));
                        c += 1;
                      } else {
                        return!0;
                      }
                    }
                  }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, r), g.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, r), null);
                }
                var s = cljs.core.first.call(null, e), t = function() {
                  return function(a, b, c, d, e) {
                    return function x(g) {
                      return new cljs.core.LazySeq(null, function(a, b, c, d, e) {
                        return function() {
                          for (;;) {
                            var a = cljs.core.seq.call(null, g);
                            if (a) {
                              if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                                var b = cljs.core.chunk_first.call(null, a), c = cljs.core.count.call(null, b), d = cljs.core.chunk_buffer.call(null, c);
                                return function() {
                                  for (var a = 0;;) {
                                    if (a < c) {
                                      var e = cljs.core._nth.call(null, b, a);
                                      cljs.core.chunk_append.call(null, d, function() {
                                        var a = lt.objs.menu.key_mappings.call(null, e);
                                        return cljs.core.truth_(a) ? a : e;
                                      }());
                                      a += 1;
                                    } else {
                                      return!0;
                                    }
                                  }
                                }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), x.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), null);
                              }
                              var e = cljs.core.first.call(null, a);
                              return cljs.core.cons.call(null, function() {
                                var a = lt.objs.menu.key_mappings.call(null, e);
                                return cljs.core.truth_(a) ? a : e;
                              }(), x.call(null, cljs.core.rest.call(null, a)));
                            }
                            return null;
                          }
                        };
                      }(a, b, c, d, e), null, null);
                    };
                  }(s, e, d, a, b).call(null, clojure.string.split.call(null, s, "-"));
                }();
                return cljs.core.cons.call(null, clojure.string.join.call(null, "+", t), g.call(null, cljs.core.rest.call(null, e)));
              }
              return null;
            }
          };
        }(a, b), null, null);
      };
    }(b, c).call(null, c);
  }();
  return!cljs.core.seq.call(null, a) || lt.objs.platform.mac_QMARK_.call(null) && !cljs.core._EQ_.call(null, cljs.core.count.call(null, a), 1) ? null : new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), clojure.string.join.call(null, " ", a)], null);
};
lt.objs.menu.cmd_item = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, c, cljs.core.PersistentArrayMap.EMPTY);
  }, c = function(a, b, c) {
    return cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), a, new cljs.core.Keyword(null, "click", "click", 1108654330), cljs.core.truth_((new cljs.core.Keyword(null, "role", "role", 1017410536)).cljs$core$IFn$_invoke$arity$1(c)) ? null : function() {
      return lt.objs.command.exec_BANG_.call(null, b);
    }], null), c, lt.objs.menu.command__GT_menu_binding.call(null, b));
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
lt.objs.menu.unknown_menu = function() {
  return lt.objs.menu.set_menubar.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.platform.mac_QMARK_.call(null) ? new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "About Light Table", new cljs.core.Keyword(null, 
  "version", "version", 1365512266)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Hide Light Table", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+H", new cljs.core.Keyword(null, "role", "role", 1017410536), "hide"], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
  "label", "label", 1116631654), "Hide Others", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+Alt+H", new cljs.core.Keyword(null, "role", "role", 1017410536), "hideothers"], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Quit Light Table", new cljs.core.Keyword(null, "quit", "quit", 1017386433), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "accelerator", "accelerator", 1975113181), "Command+Q"], null))], null)], null) : null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Edit", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Undo", new cljs.core.Keyword(null, "editor.undo", "editor.undo", 4270768183), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
  "role", "role", 1017410536), "undo", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+Z"], null)), lt.objs.menu.cmd_item.call(null, "Redo", new cljs.core.Keyword(null, "editor.redo", "editor.redo", 4270670161), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "redo", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+Shift+Z"], null)), new cljs.core.PersistentArrayMap(null, 1, 
  [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Cut", new cljs.core.Keyword(null, "editor.cut", "editor.cut", 3751346611), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "cut", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+X"], null)), lt.objs.menu.cmd_item.call(null, "Copy", new cljs.core.Keyword(null, "editor.copy", "editor.copy", 4270233288), 
  new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "copy", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+C"], null)), lt.objs.menu.cmd_item.call(null, "Paste", new cljs.core.Keyword(null, "editor.paste", "editor.paste", 3187448388), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "paste", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), 
  "CommandOrControl+V"], null)), lt.objs.menu.cmd_item.call(null, "Select All", new cljs.core.Keyword(null, "editor.select-all", "editor.select-all", 2519334883), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "selectall", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+A"], null))], null)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Window", 
  new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Minimize", new cljs.core.Keyword(null, "window.minimize", "window.minimize", 2477637198), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "minimize", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+M"], null)), lt.objs.menu.cmd_item.call(null, 
  "Close window", new cljs.core.Keyword(null, "window.close", "window.close", 3118917100), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "close", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+W"], null))], null)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Help", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), cljs.core.PersistentVector.EMPTY], 
  null)], null));
};
lt.objs.menu.main_menu = function() {
  return lt.objs.menu.set_menubar.call(null, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.platform.mac_QMARK_.call(null) ? new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "About Light Table", new cljs.core.Keyword(null, 
  "version", "version", 1365512266)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Hide Light Table", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+H", new cljs.core.Keyword(null, "role", "role", 1017410536), "hide"], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
  "label", "label", 1116631654), "Hide Others", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Command+Alt+H", new cljs.core.Keyword(null, "role", "role", 1017410536), "hideothers"], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Quit Light Table", new cljs.core.Keyword(null, "quit", "quit", 1017386433), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
  "accelerator", "accelerator", 1975113181), "Command+Q"], null))], null)], null) : null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "\x26File", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), cljs.core.into.call(null, new cljs.core.PersistentVector(null, 11, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "New file", new cljs.core.Keyword(null, "new-file", "new-file", 2344641787)), lt.objs.menu.cmd_item.call(null, 
  "Open file", new cljs.core.Keyword(null, "open-file", "open-file", 2513650321)), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Open folder", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592), new cljs.core.Keyword(null, "force", "force", 1111522909));
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.add-folder", "workspace.add-folder", 2772643205));
  }], null), lt.objs.menu.cmd_item.call(null, "Open recent workspace", new cljs.core.Keyword(null, "workspace.show-recents", "workspace.show-recents", 1806500563), cljs.core.PersistentArrayMap.EMPTY), lt.objs.menu.cmd_item.call(null, "Save file", new cljs.core.Keyword(null, "save", "save", 1017427183)), lt.objs.menu.cmd_item.call(null, "Save file as..", new cljs.core.Keyword(null, "save-as", "save-as", 2886670836)), lt.objs.menu.cmd_item.call(null, "Close file", new cljs.core.Keyword(null, "tabs.close", 
  "tabs.close", 4150844154)), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Settings", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "User keymap", new cljs.core.Keyword(null, "keymap.modify-user", "keymap.modify-user", 625546911)), lt.objs.menu.cmd_item.call(null, "User behaviors", new cljs.core.Keyword(null, 
  "behaviors.modify-user", "behaviors.modify-user", 4216959587)), lt.objs.menu.cmd_item.call(null, "User script", new cljs.core.Keyword(null, "user.modify-user", "user.modify-user", 581252813))], null)], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "New window", new cljs.core.Keyword(null, "window.new", "window.new", 2875320852)), lt.objs.menu.cmd_item.call(null, "Close window", new cljs.core.Keyword(null, 
  "window.close", "window.close", 3118917100))], null), lt.objs.platform.mac_QMARK_.call(null) ? null : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "About Light Table", new cljs.core.Keyword(null, "version", "version", 1365512266)), lt.objs.menu.cmd_item.call(null, "Quit Light Table", new cljs.core.Keyword(null, 
  "quit", "quit", 1017386433), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "Control+Q"], null))], null))], null), lt.objs.platform.mac_QMARK_.call(null) ? new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Edit", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, 
  "Undo", new cljs.core.Keyword(null, "editor.undo", "editor.undo", 4270768183), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "undo", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+Z"], null)), lt.objs.menu.cmd_item.call(null, "Redo", new cljs.core.Keyword(null, "editor.redo", "editor.redo", 4270670161), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), 
  "redo", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+Shift+Z"], null)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Cut", new cljs.core.Keyword(null, "editor.cut", "editor.cut", 3751346611), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "cut", new cljs.core.Keyword(null, "accelerator", "accelerator", 
  1975113181), "CommandOrControl+X"], null)), lt.objs.menu.cmd_item.call(null, "Copy", new cljs.core.Keyword(null, "editor.copy", "editor.copy", 4270233288), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "copy", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+C"], null)), lt.objs.menu.cmd_item.call(null, "Paste", new cljs.core.Keyword(null, "editor.paste", "editor.paste", 3187448388), new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "paste", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+V"], null)), lt.objs.menu.cmd_item.call(null, "Select All", new cljs.core.Keyword(null, "editor.select-all", "editor.select-all", 2519334883), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "role", "role", 1017410536), "selectall", new cljs.core.Keyword(null, "accelerator", "accelerator", 1975113181), "CommandOrControl+A"], 
  null))], null)], null) : new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "\x26Edit", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Undo", new cljs.core.Keyword(null, "editor.undo", "editor.undo", 4270768183)), lt.objs.menu.cmd_item.call(null, "Redo", new cljs.core.Keyword(null, "editor.redo", "editor.redo", 4270670161)), 
  new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Cut", new cljs.core.Keyword(null, "editor.cut", "editor.cut", 3751346611)), lt.objs.menu.cmd_item.call(null, "Copy", new cljs.core.Keyword(null, "editor.copy", "editor.copy", 4270233288)), lt.objs.menu.cmd_item.call(null, "Paste", new cljs.core.Keyword(null, "editor.paste", "editor.paste", 3187448388)), lt.objs.menu.cmd_item.call(null, "Select All", 
  new cljs.core.Keyword(null, "editor.select-all", "editor.select-all", 2519334883))], null)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "\x26View", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 10, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Workspace", new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592)), lt.objs.menu.cmd_item.call(null, 
  "Connections", new cljs.core.Keyword(null, "show-connect", "show-connect", 2165693836)), lt.objs.menu.cmd_item.call(null, "Navigator", new cljs.core.Keyword(null, "navigate-workspace-transient", "navigate-workspace-transient", 615022696)), lt.objs.menu.cmd_item.call(null, "Commands", new cljs.core.Keyword(null, "show-commandbar-transient", "show-commandbar-transient", 3110127655)), lt.objs.menu.cmd_item.call(null, "Plugin Manager", new cljs.core.Keyword(null, "plugin-manager.show", "plugin-manager.show", 
  3752328298)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Language docs", new cljs.core.Keyword(null, "docs.search.show", "docs.search.show", 4500636610)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), lt.objs.menu.cmd_item.call(null, "Console", new cljs.core.Keyword(null, "toggle-console", "toggle-console", 4454540112)), 
  lt.objs.menu.cmd_item.call(null, "Developer Tools", new cljs.core.Keyword(null, "dev-inspector", "dev-inspector", 4263722673))], null)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "\x26Window", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Minimize", new cljs.core.Keyword(null, "window.minimize", "window.minimize", 
  2477637198)), lt.objs.menu.cmd_item.call(null, "Maximize", new cljs.core.Keyword(null, "window.maximize", "window.maximize", 4253833852)), lt.objs.menu.cmd_item.call(null, "Fullscreen", new cljs.core.Keyword(null, "window.fullscreen", "window.fullscreen", 3710835691))], null)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "\x26Help", new cljs.core.Keyword(null, "submenu", "submenu", 3441075985), new cljs.core.PersistentVector(null, 
  3, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.menu.cmd_item.call(null, "Documentation", new cljs.core.Keyword(null, "show-docs", "show-docs", 3358896765)), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Report an Issue", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910), "https://github.com/LightTable/LightTable/issues?state\x3dopen");
  }], null), lt.objs.platform.mac_QMARK_.call(null) ? null : lt.objs.menu.cmd_item.call(null, "About Light Table", new cljs.core.Keyword(null, "version", "version", 1365512266))], null)], null)], null));
};
lt.objs.menu.__BEH__create_menu = function(a) {
  lt.objs.platform.mac_QMARK_.call(null) && (lt.objs.app.win.menu = null);
  return lt.objs.menu.main_menu.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.menu", "create-menu", "lt.objs.menu/create-menu", 1707993513), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.menu.__BEH__create_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.menu.__BEH__recreate_menu = function(a) {
  return lt.objs.platform.mac_QMARK_.call(null) ? lt.objs.menu.main_menu.call(null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.menu", "recreate-menu", "lt.objs.menu/recreate-menu", 912131484), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.menu.__BEH__recreate_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "app.keys.load", "app.keys.load", 3209213061), null], null), null), new cljs.core.Keyword(null, 
"debounce", "debounce", 1556599227), 20);
lt.objs.menu.__BEH__set_menu = function(a) {
  return lt.objs.platform.mac_QMARK_.call(null) ? lt.objs.menu.main_menu.call(null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.menu", "set-menu", "lt.objs.menu/set-menu", 4093310231), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.menu.__BEH__set_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), null], null), null));
lt.objs.menu.__BEH__remove_menu_close = function(a) {
  return lt.objs.platform.mac_QMARK_.call(null) ? lt.objs.menu.unknown_menu.call(null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.menu", "remove-menu-close", "lt.objs.menu/remove-menu-close", 1602484750), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.menu.__BEH__remove_menu_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "blur", "blur", 1016931289), null, new cljs.core.Keyword(null, "closed", "closed", 
3951351006), null], null), null));
lt.objs.menu.__BEH__menu_BANG_ = function(a, b) {
  var c = cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "order", "order", 1119910592), cljs.core.filter.call(null, cljs.core.identity, lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), cljs.core.PersistentVector.EMPTY, b)));
  lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, c));
  lt.util.dom.prevent.call(null, b);
  return lt.util.dom.stop_propagation.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.menu", "menu!", "lt.objs.menu/menu!", 2137957439), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.menu.__BEH__menu_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), null], null), null));
lt.objs.editor = {};
lt.objs.editor.__GT_cm_ed = function(a) {
  return(a ? a.cljs$lang$protocol_mask$partition0$ & 32768 || a.cljs$core$IDeref$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a)) ? (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : a;
};
lt.objs.editor.__GT_elem = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getScrollerElement().parentElement;
};
lt.objs.editor.set_val = function(a, b) {
  lt.objs.editor.__GT_cm_ed.call(null, a).setValue(cljs.core.truth_(b) ? b : "");
  return a;
};
lt.objs.editor.set_val_and_keep_cursor = function(a, b) {
  var c = lt.objs.editor.__GT_cm_ed.call(null, a).getCursor();
  lt.objs.editor.set_val.call(null, a, b);
  return lt.objs.editor.__GT_cm_ed.call(null, a).setCursor(c);
};
lt.objs.editor.set_options = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.objs.editor.__GT_cm_ed.call(null, a).setOption(cljs.core.name.call(null, h), g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.objs.editor.__GT_cm_ed.call(null, a).setOption(cljs.core.name.call(null, d), e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.editor.clear_history = function(a) {
  lt.objs.editor.__GT_cm_ed.call(null, a).clearHistory();
  return a;
};
lt.objs.editor.get_history = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getHistory();
};
lt.objs.editor.set_history = function(a, b) {
  lt.objs.editor.__GT_cm_ed.call(null, a).setHistory(b);
  return a;
};
lt.objs.editor.expand_tab = function(a) {
  if (cljs.core.truth_(a.somethingSelected())) {
    return a.indentSelection("add");
  }
  if (cljs.core.truth_(a.getOption("indentWithTabs"))) {
    return a.replaceSelection("\t", "end", "+input");
  }
  if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
    var b = Array(a.getOption("indentUnit") + 1).join(" ");
    return a.replaceSelection(b, "end", "+input");
  }
  return null;
};
lt.objs.editor.headless = function(a) {
  return lt.objs.editor.set_options.call(null, new CodeMirror(function() {
    return null;
  }), a);
};
lt.objs.editor.make = function(a) {
  var b = lt.objs.editor.headless.call(null, new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null, "mode", "mode", 1017261333), cljs.core.truth_((new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(a)) ? cljs.core.name.call(null, (new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(a)) : "plaintext", new cljs.core.Keyword(null, "autoClearEmptyLines", "autoClearEmptyLines", 2992165282), !0, new cljs.core.Keyword(null, 
  "dragDrop", "dragDrop", 4466739637), !1, new cljs.core.Keyword(null, "undoDepth", "undoDepth", 4525515697), 1E4, new cljs.core.Keyword(null, "matchBrackets", "matchBrackets", 3793519906), !0, new cljs.core.Keyword(null, "singleCursorHeightPerLine", "singleCursorHeightPerLine", 644904414), !1, new cljs.core.Keyword(null, "showCursorWhenSelecting", "showCursorWhenSelecting", 3298041035), !0], null)), c = (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(a);
  cljs.core.truth_(c) && (lt.objs.editor.set_val.call(null, b, c), lt.objs.editor.clear_history.call(null, b));
  cljs.core.truth_((new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a)) && b.swapDoc((new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a))));
  return b;
};
lt.objs.editor.on = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).on(cljs.core.name.call(null, b), c);
};
lt.objs.editor.off = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).off(cljs.core.name.call(null, b), c);
};
lt.objs.editor.wrap_object_events = function(a, b) {
  lt.util.dom.on.call(null, lt.objs.editor.__GT_elem.call(null, a), new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(a) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), a);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "dragstart", "dragstart", 721070880), function(a, b) {
    return b.preventDefault();
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "dragenter", "dragenter", 707980694), function(a, b) {
    return b.preventDefault();
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "dragover", "dragover", 4468024186), function(a, b) {
    return b.preventDefault();
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "drop", "drop", 1016996449), function(a, b) {
    return b.preventDefault();
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "scroll", "scroll", 4401191487), function(a) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "scroll", "scroll", 4401191487), a);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "update", "update", 4470025275), function(a, d) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "update", "update", 4470025275), a, d);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "change", "change", 3947235106), function(a, d) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "change", "change", 3947235106), a, d);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "inputRead", "inputRead", 2720801778), function(a, d) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "input", "input", 1114262332), a, d);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "cursorActivity", "cursorActivity", 2053482487), function(a, d) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "move", "move", 1017261891), a, d);
  });
  lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "focus", "focus", 1111509066), function(a) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "focus", "focus", 1111509066), a);
  });
  return lt.objs.editor.on.call(null, a, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function(a) {
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "blur", "blur", 1016931289), a);
  });
};
lt.objs.editor.__GT_val = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getValue();
};
lt.objs.editor.__GT_token = function(a, b) {
  return cljs.core.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).getTokenAt(cljs.core.clj__GT_js.call(null, b)), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
};
lt.objs.editor.__GT_token_js = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getTokenAt(cljs.core.clj__GT_js.call(null, b));
};
lt.objs.editor.__GT_token_type = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getTokenTypeAt(cljs.core.clj__GT_js.call(null, b));
};
lt.objs.editor.__GT_coords = function(a) {
  return cljs.core.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).cursorCoords(), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0, new cljs.core.Keyword(null, "force-obj", "force-obj", 2540778119), !0);
};
lt.objs.editor._PLUS_class = function(a, b) {
  lt.util.dom.add_class.call(null, lt.objs.editor.__GT_elem.call(null, a), cljs.core.name.call(null, b));
  return a;
};
lt.objs.editor._class = function(a, b) {
  lt.util.dom.remove_class.call(null, lt.objs.editor.__GT_elem.call(null, a), cljs.core.name.call(null, b));
  return a;
};
lt.objs.editor.cursor = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    return lt.objs.editor.__GT_cm_ed.call(null, a).getCursor(b);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.editor.__GT_cursor = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), e = lt.objs.editor.cursor.call(null, a, e);
    return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), e.line, new cljs.core.Keyword(null, "ch", "ch", 1013907415), e.ch], null);
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.editor.pos__GT_index = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).indexFromPos(cljs.core.clj__GT_js.call(null, b));
};
lt.objs.editor.mark = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).markText(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c), cljs.core.clj__GT_js.call(null, d));
};
lt.objs.editor.find_marks = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).findMarksAt(cljs.core.clj__GT_js.call(null, b));
};
lt.objs.editor.bookmark = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).setBookmark(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c));
};
lt.objs.editor.option = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getOption(cljs.core.name.call(null, b));
};
lt.objs.editor.set_mode = function(a, b) {
  lt.objs.editor.__GT_cm_ed.call(null, a).setOption("mode", b);
  return a;
};
lt.objs.editor.__GT_mode = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getMode();
};
lt.objs.editor.focus = function(a) {
  lt.objs.editor.__GT_cm_ed.call(null, a).focus();
  return a;
};
lt.objs.editor.input_field = function(a) {
  return a.getInputField();
};
lt.objs.editor.blur = function(a) {
  lt.objs.editor.input_field.call(null, a).blur();
  return a;
};
lt.objs.editor.refresh = function(a) {
  lt.objs.editor.__GT_cm_ed.call(null, a).refresh();
  return a;
};
lt.objs.editor.on_move = function(a, b) {
  a.on("onCursorActivity", function(a, d) {
    return b.call(null, a, d);
  });
  return a;
};
lt.objs.editor.on_change = function(a, b) {
  a.on("onChange", function(a, d) {
    return b.call(null, a, d);
  });
  return a;
};
lt.objs.editor.on_update = function(a, b) {
  a.on("onUpdate", function(a, d) {
    return b.call(null, a, d);
  });
  return a;
};
lt.objs.editor.on_scroll = function(a, b) {
  a.on("onScroll", function(a) {
    return b.call(null, a);
  });
  return a;
};
lt.objs.editor.replace = function() {
  var a = null, b = function(a, b, c) {
    return lt.objs.editor.__GT_cm_ed.call(null, a).replaceRange(c, cljs.core.clj__GT_js.call(null, b));
  }, c = function(a, b, c, g) {
    return lt.objs.editor.__GT_cm_ed.call(null, a).replaceRange(g, cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c));
  }, a = function(a, e, f, g) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 4:
        return c.call(this, a, e, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  return a;
}();
lt.objs.editor.range = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getRange(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c));
};
lt.objs.editor.line_count = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).lineCount();
};
lt.objs.editor.insert_at_cursor = function(a, b) {
  lt.objs.editor.replace.call(null, lt.objs.editor.__GT_cm_ed.call(null, a), lt.objs.editor.__GT_cursor.call(null, a), b);
  return a;
};
lt.objs.editor.move_cursor = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).setCursor(cljs.core.clj__GT_js.call(null, cljs.core.truth_(b) ? b : new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), 0, new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0], null)));
};
lt.objs.editor.scroll_to = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).scrollTo(b, c);
};
lt.objs.editor.center_cursor = function(a) {
  var b = (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null, a)), b = lt.objs.editor.__GT_cm_ed.call(null, a).charCoords(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), b, new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0], null)), "local").top, c = lt.objs.editor.__GT_cm_ed.call(null, a).getScrollerElement().offsetHeight / 2;
  return lt.objs.editor.scroll_to.call(null, a, null, b - c - -55);
};
lt.objs.editor.selection_QMARK_ = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).somethingSelected();
};
lt.objs.editor.selection_bounds = function(a) {
  return cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null, a)) ? new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "from", "from", 1017056028), lt.objs.editor.__GT_cursor.call(null, a, "start"), new cljs.core.Keyword(null, "to", "to", 1013907949), lt.objs.editor.__GT_cursor.call(null, a, "end")], null) : null;
};
lt.objs.editor.selection = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getSelection();
};
lt.objs.editor.set_selection = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).setSelection(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c));
};
lt.objs.editor.set_extending = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).setExtending(b);
};
lt.objs.editor.replace_selection = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    return lt.objs.editor.__GT_cm_ed.call(null, a).replaceSelection(b, cljs.core.name.call(null, cljs.core.truth_(e) ? e : new cljs.core.Keyword(null, "end", "end", 1014004813)), "+input");
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.editor.undo = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).undo();
};
lt.objs.editor.redo = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).redo();
};
lt.objs.editor.copy = function(a) {
  return lt.objs.platform.copy.call(null, lt.objs.editor.selection.call(null, a));
};
lt.objs.editor.cut = function(a) {
  lt.objs.editor.copy.call(null, a);
  return lt.objs.editor.replace_selection.call(null, a, "");
};
lt.objs.editor.paste = function(a) {
  return lt.objs.editor.replace_selection.call(null, a, lt.objs.platform.paste.call(null));
};
lt.objs.editor.char_coords = function(a, b) {
  return cljs.core.js__GT_clj.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).charCoords(cljs.core.clj__GT_js.call(null, b)), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0, new cljs.core.Keyword(null, "force-obj", "force-obj", 2540778119), !0);
};
lt.objs.editor.operation = function(a, b) {
  lt.objs.editor.__GT_cm_ed.call(null, a).operation(b);
  return a;
};
lt.objs.editor.on_click = function(a, b) {
  var c = lt.objs.editor.__GT_elem.call(null, a);
  lt.util.events.capture.call(null, c, new cljs.core.Keyword(null, "mousedown", "mousedown", 1600748089), b);
  return a;
};
lt.objs.editor.extension = function(a, b) {
  return CodeMirror.defineExtension(a, b);
};
lt.objs.editor.line_widget = function() {
  var a = function(a, b, e, f) {
    f = cljs.core.nth.call(null, f, 0, null);
    return lt.objs.editor.__GT_cm_ed.call(null, a).addLineWidget(b, e, cljs.core.clj__GT_js.call(null, f));
  }, b = function(b, d, e, f) {
    var g = null;
    3 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 3), 0));
    return a.call(this, b, d, e, g);
  };
  b.cljs$lang$maxFixedArity = 3;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.next(b);
    var f = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, f, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.editor.remove_line_widget = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).removeLineWidget(b);
};
lt.objs.editor.line = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getLine(b);
};
lt.objs.editor.first_line = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).firstLine();
};
lt.objs.editor.last_line = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).lastLine();
};
lt.objs.editor.line_handle = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getLineHandle(b);
};
lt.objs.editor.lh__GT_line = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getLineNumber(b);
};
lt.objs.editor.line_length = function(a, b) {
  return cljs.core.count.call(null, lt.objs.editor.line.call(null, a, b));
};
lt.objs.editor.select_all = function(a) {
  return lt.objs.editor.set_selection.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), lt.objs.editor.first_line.call(null, a), new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "line", "line", 1017226086), lt.objs.editor.last_line.call(null, a)], null));
};
lt.objs.editor.set_line = function(a, b, c) {
  var d = lt.objs.editor.line_length.call(null, a, b);
  return lt.objs.editor.replace.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), b, new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), b, new cljs.core.Keyword(null, "ch", "ch", 1013907415), d], null), c);
};
lt.objs.editor._PLUS_line_class = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).addLineClass(b, cljs.core.name.call(null, c), cljs.core.name.call(null, d));
};
lt.objs.editor._line_class = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).removeLineClass(b, cljs.core.name.call(null, c), cljs.core.name.call(null, d));
};
lt.objs.editor.show_hints = function(a, b, c) {
  CodeMirror.showHint(lt.objs.editor.__GT_cm_ed.call(null, a), b, cljs.core.clj__GT_js.call(null, c));
  return a;
};
lt.objs.editor.inner_mode = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c;
    c = cljs.core.truth_(b) ? b : lt.objs.editor.__GT_token_js.call(null, a, lt.objs.editor.cursor.call(null, a)).state;
    return CodeMirror.innerMode(lt.objs.editor.__GT_cm_ed.call(null, a).getMode(), c).mode;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.editor.adjust_loc = function() {
  var a = null, b = function(b, c) {
    return a.call(null, b, c, new cljs.core.Keyword(null, "ch", "ch", 1013907415));
  }, c = function(a, b, c) {
    return cljs.core.truth_(a) ? cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [c], null), cljs.core._PLUS_, b) : null;
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 2:
        return b.call(this, a, e);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$2 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
lt.objs.editor.get_char = function(a, b) {
  var c = lt.objs.editor.__GT_cursor.call(null, a);
  return 0 < b ? lt.objs.editor.range.call(null, a, c, lt.objs.editor.adjust_loc.call(null, c, b)) : lt.objs.editor.range.call(null, a, lt.objs.editor.adjust_loc.call(null, c, b), c);
};
lt.objs.editor.indent_line = function(a, b, c) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).indentLine(b, c);
};
lt.objs.editor.indent_lines = function(a, b, c, d) {
  a = lt.objs.editor.__GT_cm_ed.call(null, a);
  var e = (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c) - (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b);
  if (0 === e) {
    return a.indentLine((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c), d);
  }
  c = e + 1;
  for (d = 0;;) {
    if (d < c) {
      a.indentLine((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b) + d), d += 1;
    } else {
      return null;
    }
  }
};
lt.objs.editor.indent_selection = function(a, b) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).indentSelection(b);
};
lt.objs.editor.line_comment = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).lineComment(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c), cljs.core.clj__GT_js.call(null, d));
};
lt.objs.editor.uncomment = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).uncomment(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c), cljs.core.clj__GT_js.call(null, d));
};
lt.objs.editor.block_comment = function(a, b, c, d) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).blockComment(cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c), cljs.core.clj__GT_js.call(null, d));
};
lt.objs.editor.toggle_comment = function(a, b, c, d) {
  return cljs.core.truth_(lt.objs.editor.uncomment.call(null, a, b, c, d)) ? null : cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c)) ? lt.objs.editor.line_comment.call(null, a, b, lt.objs.editor.__GT_cursor.call(null, a, "end"), d) : lt.objs.editor.block_comment.call(null, a, b, c, d);
};
lt.objs.editor.__GT_generation = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).changeGeneration();
};
lt.objs.editor.dirty_QMARK_ = function(a, b) {
  return cljs.core.not.call(null, lt.objs.editor.__GT_cm_ed.call(null, a).isClean(b));
};
lt.objs.editor.get_doc = function(a) {
  return lt.objs.editor.__GT_cm_ed.call(null, a).getDoc();
};
lt.objs.editor.set_doc_BANG_ = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "doc", "doc", 1014003882), b], null));
  return lt.objs.editor.__GT_cm_ed.call(null, a).swapDoc((new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
};
lt.objs.editor.fold_code = function() {
  var a = null, b = function(b) {
    return a.call(null, b, lt.objs.editor.__GT_cursor.call(null, b));
  }, c = function(a, b) {
    return lt.objs.editor.__GT_cm_ed.call(null, a).foldCode(cljs.core.clj__GT_js.call(null, b));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.editor.gutter_widths = function(a) {
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "div.CodeMirror-gutters", "div.CodeMirror-gutters", 1932435974), lt.object.__GT_content.call(null, a));
  var b = lt.util.dom.$$.call(null, new cljs.core.Keyword(null, "div.CodeMirror-gutter", "div.CodeMirror-gutter", 4091575601), a);
  return cljs.core.reduce.call(null, function(a, b) {
    return function(a, b) {
      var c = clojure.string.replace_first.call(null, lt.util.dom.attr.call(null, b, "class"), "CodeMirror-gutter ", "");
      return cljs.core.assoc.call(null, a, c, lt.util.dom.width.call(null, b));
    };
  }(a, b), cljs.core.PersistentArrayMap.EMPTY, b);
};
lt.objs.editor.update_gutters = function(a, b, c) {
  var d = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "div.CodeMirror-gutters", "div.CodeMirror-gutters", 1932435974), lt.object.__GT_content.call(null, a));
  return lt.objs.editor.operation.call(null, a, function() {
    lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "gutters", "gutters", 1397798442), cljs.core.clj__GT_js.call(null, b)], null));
    for (var e = cljs.core.seq.call(null, c), f = null, g = 0, h = 0;;) {
      if (h < g) {
        var k = cljs.core._nth.call(null, f, h), l = cljs.core.nth.call(null, k, 0, null), k = cljs.core.nth.call(null, k, 1, null), l = lt.util.dom.$.call(null, [cljs.core.str("div."), cljs.core.str(l)].join(""), d);
        cljs.core.truth_(l) && lt.util.dom.set_css.call(null, l, new cljs.core.PersistentArrayMap(null, 1, ["width", [cljs.core.str(k), cljs.core.str("px")].join("")], null));
        h += 1;
      } else {
        if (e = cljs.core.seq.call(null, e)) {
          cljs.core.chunked_seq_QMARK_.call(null, e) ? (l = cljs.core.chunk_first.call(null, e), e = cljs.core.chunk_rest.call(null, e), f = l, g = l = cljs.core.count.call(null, l)) : (f = cljs.core.first.call(null, e), l = cljs.core.nth.call(null, f, 0, null), k = cljs.core.nth.call(null, f, 1, null), f = lt.util.dom.$.call(null, [cljs.core.str("div."), cljs.core.str(l)].join(""), d), cljs.core.truth_(f) && lt.util.dom.set_css.call(null, f, new cljs.core.PersistentArrayMap(null, 1, ["width", [cljs.core.str(k), 
          cljs.core.str("px")].join("")], null)), e = cljs.core.next.call(null, e), f = null, g = 0), h = 0;
        } else {
          return null;
        }
      }
    }
  });
};
lt.objs.editor.add_gutter = function(a, b, c) {
  var d = cljs.core.set.call(null, cljs.core.conj.call(null, cljs.core.js__GT_clj.call(null, lt.objs.editor.option.call(null, a, "gutters")), b)), e = lt.objs.editor.gutter_widths.call(null, a);
  b = cljs.core.assoc.call(null, e, b, c);
  return lt.objs.editor.update_gutters.call(null, a, d, b);
};
lt.objs.editor.remove_gutter = function(a, b) {
  var c = cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), cljs.core.js__GT_clj.call(null, lt.objs.editor.option.call(null, a, "gutters"))), d = lt.objs.editor.gutter_widths.call(null, a);
  return lt.objs.editor.update_gutters.call(null, a, c, d);
};
lt.util.load.js.call(null, "core/node_modules/codemirror/lib/codemirror.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "editor", "lt.objs.editor/editor", 3793959614), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "editor.inline-result", "editor.inline-result", 1965420162), null, new cljs.core.Keyword(null, "editor", "editor", 4001043679), null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330), 
null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  var c = lt.objs.editor.make.call(null, b);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), c, new cljs.core.Keyword(null, "doc", "doc", 1014003882), (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "info", "info", 1017141280), cljs.core.dissoc.call(null, b, new cljs.core.Keyword(null, "content", "content", 1965434859), new cljs.core.Keyword(null, "doc", "doc", 1014003882))], null));
  lt.objs.editor.wrap_object_events.call(null, c, a);
  return lt.objs.editor.__GT_elem.call(null, c);
});
lt.objs.editor.__BEH__wrap = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineWrapping", "lineWrapping", 2343432258), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "wrap", "lt.objs.editor/wrap", 1346285593), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__wrap, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Wrap lines", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", "object.instant", 
773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "no-wrap", "lt.objs.editor/no-wrap", 3540780885)], null));
lt.objs.editor.__BEH__no_wrap = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineWrapping", "lineWrapping", 2343432258), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "no-wrap", "lt.objs.editor/no-wrap", 3540780885), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__no_wrap, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Unwrap lines", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", "object.instant", 
773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "wrap", "lt.objs.editor/wrap", 1346285593)], null));
lt.objs.editor.__BEH__line_numbers = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineNumbers", "lineNumbers", 3695398696), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "line-numbers", "lt.objs.editor/line-numbers", 3399978738), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__line_numbers, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Show line numbers", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", 
"object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "hide-line-numbers", "lt.objs.editor/hide-line-numbers", 
1337733131)], null));
lt.objs.editor.__BEH__hide_line_numbers = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineNumbers", "lineNumbers", 3695398696), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "hide-line-numbers", "lt.objs.editor/hide-line-numbers", 1337733131), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__hide_line_numbers, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Hide line numbers", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "line-numbers", "lt.objs.editor/line-numbers", 
3399978738)], null));
lt.objs.editor.__BEH__fold_gutter = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "foldGutter", "foldGutter", 3625682926), !0, new cljs.core.Keyword(null, "gutters", "gutters", 1397798442), cljs.core.clj__GT_js.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["CodeMirror-foldgutter"], null))], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "fold-gutter", "lt.objs.editor/fold-gutter", 3133215688), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__fold_gutter, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Show fold gutter", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", 
"object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "hide-fold-gutter", "lt.objs.editor/hide-fold-gutter", 
3213948875)], null));
lt.objs.editor.__BEH__hide_fold_gutter = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "foldGutter", "foldGutter", 3625682926), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "hide-fold-gutter", "lt.objs.editor/hide-fold-gutter", 3213948875), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__hide_fold_gutter, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Hide fold gutter", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "fold-gutter", "lt.objs.editor/fold-gutter", 
3133215688)], null));
lt.objs.editor.__BEH__scroll_past_end = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "scrollPastEnd", "scrollPastEnd", 680406862), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "scroll-past-end", "lt.objs.editor/scroll-past-end", 3534578831), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__scroll_past_end, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Allow scrolling past the end of the file", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null, new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.__BEH__tab_settings = function(a, b, c, d) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "tabSize", "tabSize", 3755226280), c, new cljs.core.Keyword(null, "indentWithTabs", "indentWithTabs", 4541079970), b, new cljs.core.Keyword(null, "indentUnit", "indentUnit", 1493236674), d], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "tab-settings", "lt.objs.editor/tab-settings", 4309723340), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__tab_settings, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: indent settings (tab size, etc)", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Use tabs?", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "boolean", "boolean", 1078615962)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Tab size in spaces", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "number", "number", 4274507451)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "Spaces per indent", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "number", "number", 4274507451)], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.__BEH__set_codemirror_flags = function(a, b) {
  return lt.objs.editor.set_options.call(null, a, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "set-codemirror-flags", "lt.objs.editor/set-codemirror-flags", 1126863090), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__set_codemirror_flags, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Set CodeMirror flags", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Flags map", new cljs.core.Keyword(null, "ex", "ex", 1013907493), "{:undoDepth 1000}"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", 
"user", 1017503549));
lt.objs.editor.__BEH__read_only = function(a) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "name", "name", 1017277949)], null), cljs.core.str, " (read-only)");
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "readOnly", "readOnly", 4441187796), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "read-only", "lt.objs.editor/read-only", 4613138148), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__read_only, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: make editor read-only", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", 
"object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "not-read-only", "lt.objs.editor/not-read-only", 768575834)], null));
lt.objs.editor.__BEH__not_read_only = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "readOnly", "readOnly", 4441187796), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "not-read-only", "lt.objs.editor/not-read-only", 768575834), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__not_read_only, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: make editor writable", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.editor", "read-only", "lt.objs.editor/read-only", 4613138148)], null));
lt.objs.editor.__BEH__blink_rate = function(a, b) {
  return cljs.core.truth_(b) ? lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cursorBlinkRate", "cursorBlinkRate", 3128673048), b], null)) : lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cursorBlinkRate", "cursorBlinkRate", 3128673048), 0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "blink-rate", "lt.objs.editor/blink-rate", 1889690546), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__blink_rate, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: set cursor blink rate", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", 
"object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.__BEH__active_on_focus = function(a) {
  lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.active", "editor.active", 3541692953)], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "active-on-focus", "lt.objs.editor/active-on-focus", 4342250962), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__active_on_focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), null], null), null));
lt.objs.editor.__BEH__inactive_on_blur = function(a) {
  lt.object.remove_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.active", "editor.active", 3541692953)], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "inactive-on-blur", "lt.objs.editor/inactive-on-blur", 3268387892), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__inactive_on_blur, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "blur", "blur", 1016931289), null], null), null));
lt.objs.editor.__BEH__refresh_BANG_ = function(a) {
  return lt.objs.editor.refresh.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "refresh!", "lt.objs.editor/refresh!", 4525044613), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__refresh_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.editor.__BEH__on_tags_added = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      cljs.core.truth_(g) && lt.objs.context.in_BANG_.call(null, g, a);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = e, e = g) : (g = cljs.core.first.call(null, d), cljs.core.truth_(g) && lt.objs.context.in_BANG_.call(null, g, a), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "on-tags-added", "lt.objs.editor/on-tags-added", 4259979625), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__on_tags_added, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.object", "tags-added", "lt.object/tags-added", 1756253556), null], null), null));
lt.objs.editor.__BEH__on_tags_removed = function(a, b) {
  for (var c = cljs.core.seq.call(null, b), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      cljs.core.truth_(g) && lt.objs.context.out_BANG_.call(null, g, a);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = e, e = g) : (g = cljs.core.first.call(null, d), cljs.core.truth_(g) && lt.objs.context.out_BANG_.call(null, g, a), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "on-tags-removed", "lt.objs.editor/on-tags-removed", 2409922633), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__on_tags_removed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.object", "tags-removed", "lt.object/tags-removed", 4080090644), null], null), null));
lt.objs.editor.__BEH__context_on_active = function(a) {
  return lt.objs.context.in_BANG_.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "context-on-active", "lt.objs.editor/context-on-active", 643826709), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__context_on_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.editor.__BEH__context_on_inactive = function(a) {
  var b = (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679));
  lt.objs.context.out_BANG_.call(null, b);
  cljs.core.truth_(cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c) && lt.objs.context.in_BANG_.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)), c);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "deactivated", "deactivated", 3538760162));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "context-on-inactive", "lt.objs.editor/context-on-inactive", 1419388652), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__context_on_inactive, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "inactive", "inactive", 1038569437), null], null), null));
lt.objs.editor.__BEH__refresh_on_show = function(a) {
  lt.objs.editor.refresh.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "refresh-on-show", "lt.objs.editor/refresh-on-show", 2505854762), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__refresh_on_show, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.editor.__BEH__focus = function(a) {
  return lt.objs.editor.focus.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "focus", "lt.objs.editor/focus", 1575225175), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.editor.__BEH__destroy_on_close = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "closed", "closed", 3951351006));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "destroy-on-close", "lt.objs.editor/destroy-on-close", 3987096430), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__destroy_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close.force", "close.force", 4409585383), null], null), null));
lt.objs.editor.__BEH__highlight_current_line = function(a) {
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "styleActiveLine", "styleActiveLine", 2621174813), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "highlight-current-line", "lt.objs.editor/highlight-current-line", 2698251298), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__highlight_current_line, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Highlight the current line", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.__BEH__on_change = function() {
  var a = function(a, b, e) {
    return cljs.core.apply.call(null, lt.objs.command.exec_BANG_, b, e);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "on-change", "lt.objs.editor/on-change", 936351949), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__on_change, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: On change execute command", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "command"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "change", "change", 3947235106), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 300);
lt.objs.editor.__BEH__menu_BANG_ = function(a, b) {
  var c = cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "order", "order", 1119910592), lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), cljs.core.PersistentVector.EMPTY));
  lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, c));
  lt.util.dom.prevent.call(null, b);
  return lt.util.dom.stop_propagation.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "menu!", "lt.objs.editor/menu!", 1447479681), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__menu_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), null], null), null));
lt.objs.editor.__BEH__copy_paste_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Copy", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "enabled", "enabled", 3699277491), cljs.core.boolean$.call(null, lt.objs.editor.selection_QMARK_.call(null, a)), new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.editor.copy.call(null, a);
  }], null), new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Cut", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "enabled", "enabled", 3699277491), cljs.core.boolean$.call(null, lt.objs.editor.selection_QMARK_.call(null, a)), new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.editor.cut.call(null, a);
  }], null), new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Paste", new cljs.core.Keyword(null, "order", "order", 1119910592), 3, new cljs.core.Keyword(null, "enabled", "enabled", 3699277491), cljs.core.boolean$.call(null, !cljs.core.empty_QMARK_.call(null, lt.objs.platform.paste.call(null))), new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.editor.paste.call(null, a);
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator", new cljs.core.Keyword(null, "order", "order", 1119910592), 4], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Select all", new cljs.core.Keyword(null, "order", "order", 1119910592), 5, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.editor.select_all.call(null, a);
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "copy-paste-menu+", "lt.objs.editor/copy-paste-menu+", 3812291465), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__copy_paste_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.editor.mode_blacklist = new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 6, ["css", null, "clojure", null, "javascript", null, "htmlmixed", null, "htmlembedded", null, "python", null], null), null);
lt.objs.editor.__BEH__init_codemirror = function(a) {
  lt.util.load.js.call(null, "core/node_modules/codemirror/addon/edit/matchbrackets.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  lt.util.load.js.call(null, "core/node_modules/codemirror/addon/edit/closebrackets.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  lt.util.load.js.call(null, "core/node_modules/codemirror/addon/comment/comment.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  lt.util.load.js.call(null, "core/node_modules/codemirror/addon/selection/active-line.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  lt.util.load.js.call(null, "core/node_modules/codemirror_addons/overlay.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  lt.util.load.js.call(null, "core/node_modules/codemirror/addon/scroll/scrollpastend.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  a = cljs.core.seq.call(null, lt.objs.files.ls.call(null, lt.objs.files.lt_home.call(null, "core/node_modules/codemirror/addon/fold")));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, e), "js") && lt.util.load.js.call(null, [cljs.core.str("core/node_modules/codemirror/addon/fold/"), cljs.core.str(e)].join(""), new cljs.core.Keyword(null, "sync", "sync", 1017449997));
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (a = cljs.core.first.call(null, b), cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "js") && lt.util.load.js.call(null, [cljs.core.str("core/node_modules/codemirror/addon/fold/"), cljs.core.str(a)].join(""), new cljs.core.Keyword(null, "sync", "sync", 1017449997)), a = cljs.core.next.call(null, b), 
        b = null, c = 0), d = 0;
      } else {
        break;
      }
    }
  }
  lt.util.load.css.call(null, "node_modules/codemirror/addon/fold/foldgutter.css");
  lt.util.load.js.call(null, "core/node_modules/codemirror/keymap/sublime.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  a = cljs.core.seq.call(null, lt.objs.files.filter_walk.call(null, function(a) {
    return cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "js") && cljs.core.not.call(null, cljs.core.some.call(null, function(b) {
      return-1 < a.indexOf([cljs.core.str("core/node_modules/codemirror/mode/"), cljs.core.str(b), cljs.core.str("/")].join(""));
    }, lt.objs.editor.mode_blacklist)) && cljs.core.not.call(null, a.endsWith("test.js"));
  }, lt.objs.files.lt_home.call(null, "core/node_modules/codemirror/mode")));
  b = null;
  for (d = c = 0;;) {
    if (d < c) {
      e = cljs.core._nth.call(null, b, d), lt.util.load.js.call(null, e, new cljs.core.Keyword(null, "sync", "sync", 1017449997)), d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (a = cljs.core.first.call(null, b), lt.util.load.js.call(null, a, new cljs.core.Keyword(null, "sync", "sync", 1017449997)), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        break;
      }
    }
  }
  return CodeMirror.keyMap.basic.Tab = lt.objs.editor.expand_tab;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "init-codemirror", "lt.objs.editor/init-codemirror", 2308508570), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__init_codemirror, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.editor.__BEH__load_addon = function(a, b) {
  var c = cljs.core.map.call(null, function(a) {
    return lt.objs.files.join.call(null, lt.objs.files.lt_home.call(null), "core/node_modules/codemirror/addon", a);
  }, cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null));
  lt.object.call_behavior_reaction.call(null, new cljs.core.Keyword("lt.objs.plugins", "load-js", "lt.objs.plugins/load-js", 3701155451), a, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "js");
  }, c));
  return lt.object.call_behavior_reaction.call(null, new cljs.core.Keyword("lt.objs.plugins", "load-css", "lt.objs.plugins/load-css", 934792943), a, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "css");
  }, c));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "load-addon", "lt.objs.editor/load-addon", 3778832778), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__load_addon, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Load CodeMirror addon path(s)", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "path(s)", new cljs.core.Keyword(null, "example", "example", 3985900764), "edit/matchtags.js"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.objs.editor.__BEH__set_rulers = function(a, b) {
  cljs.core.truth_(lt.objs.editor.__GT_cm_ed.call(null, a).getOption("rulers")) || lt.util.load.js.call(null, "core/node_modules/codemirror/addon/display/rulers.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  var c;
  c = cljs.core.truth_(b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "lineStyle", "lineStyle", 3501738383), "dashed", new cljs.core.Keyword(null, "color", "color", 1108746965), "#aff", new cljs.core.Keyword(null, "column", "column", 3954034376), 80], null)], null);
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rulers", "rulers", 4388997551), cljs.core.clj__GT_js.call(null, c)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "set-rulers", "lt.objs.editor/set-rulers", 3148696167), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__set_rulers, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Set CodeMirror rulers", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Vector of rulers", new cljs.core.Keyword(null, "example", "example", 3985900764), '[{:color "#cfc" :column 100 :lineStyle "dashed"}]'], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 
1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.editor.__BEH__autoclose_brackets = function(a, b) {
  return cljs.core.truth_(b) ? lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "autoCloseBrackets", "autoCloseBrackets", 4348439782), cljs.core.clj__GT_js.call(null, b)], null)) : lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "autoCloseBrackets", "autoCloseBrackets", 4348439782), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor", "autoclose-brackets", "lt.objs.editor/autoclose-brackets", 2094848960), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.__BEH__autoclose_brackets, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Enable autoclose brackets", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "map", new cljs.core.Keyword(null, "example", "example", 3985900764), '{:pairs "()[]{}\'\'\\"\\"" :explode "[]{}"}'], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.objs.tabs = {};
lt.util.load.js.call(null, "core/node_modules/lighttable/ui/dragdrop.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
lt.objs.tabs.multi_def = lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "multi-editor2", "lt.objs.tabs/multi-editor2", 1325787623), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tabs", "tabs", 1017456368), null], null), null), new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "left", 
"left", 1017222009), 0, new cljs.core.Keyword(null, "right", "right", 1122416014), 0, new cljs.core.Keyword(null, "bottom", "bottom", 3925642653), 0, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tabsets", "div.tabsets", 1029252219), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "bottom", "bottom", 3925642653), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "tabset-bottom", 
  "tabset-bottom", 2176185021)), lt.util.style.__GT_px)], null)], null)], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tabsets-elem", "tabsets-elem", 4253111048), b], null));
  lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "tabs", "tabs", 1017456368), a);
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#multi", "div#multi", 1721072185), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "left", "left", 1017222009), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "left", "left", 1017222009)), lt.util.style.__GT_px), 
  new cljs.core.Keyword(null, "right", "right", 1122416014), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "right", "right", 1122416014)), lt.util.style.__GT_px), new cljs.core.Keyword(null, "bottom", "bottom", 3925642653), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "bottom", "bottom", 3925642653)), lt.util.style.__GT_px)], null)], null), b], null);
});
lt.objs.tabs.multi = lt.object.create.call(null, lt.objs.tabs.multi_def);
lt.objs.tabs.ensure_visible = function(a, b) {
  var c = lt.util.dom.$$.call(null, ".list li", lt.object.__GT_content.call(null, b))[a];
  if (cljs.core.truth_(c)) {
    var d = c.offsetLeft, e = d + c.clientWidth, c = lt.util.dom.parent.call(null, lt.util.dom.parent.call(null, c)), f = c.clientWidth, g = c.scrollLeft;
    return d >= g && e <= g + f ? null : g > d ? c.scrollLeft = d - 50 : c.scrollLeft = e - f + 50;
  }
  return null;
};
lt.objs.tabs.__GT_index = function(a) {
  return cljs.core.truth_(function() {
    if (cljs.core.truth_(a)) {
      var b = cljs.core.deref.call(null, a);
      return cljs.core.truth_(b) ? (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : b;
    }
    return a;
  }()) ? cljs.core.first.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return cljs.core._EQ_.call(null, a, cljs.core.second.call(null, b));
  }, cljs.core.map_indexed.call(null, cljs.core.vector, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))))))) : null;
};
lt.objs.tabs.active_BANG_ = function(a) {
  return cljs.core.truth_(cljs.core.truth_(a) ? (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : a) ? (lt.object.merge_BANG_.call(null, (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826), a], null)), 
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "show", "show", 1017433711)), lt.objs.tabs.ensure_visible.call(null, lt.objs.tabs.__GT_index.call(null, a), (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) : null;
};
lt.objs.tabs.update_tab_order = function(a, b) {
  var c = cljs.core.vector_QMARK_.call(null, b) ? b : cljs.core.map.call(null, function(a) {
    return lt.util.dom.attr.call(null, a, new cljs.core.Keyword(null, "pos", "pos", 1014015430));
  }, b), d = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "objs", "objs", 1017308622), cljs.core.mapv.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c), new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826), null], null));
  return lt.objs.tabs.active_BANG_.call(null, d);
};
lt.objs.tabs.__GT_name = function(a) {
  var b = cljs.core.get_in.call(null, cljs.core.deref.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "name", "name", 1017277949)], null));
  if (cljs.core.truth_(b)) {
    return b;
  }
  a = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  return cljs.core.truth_(a) ? a : "unknown";
};
lt.objs.tabs.__GT_path = function(a) {
  var b = cljs.core.get_in.call(null, cljs.core.deref.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "path", "path", 1017337751)], null));
  if (cljs.core.truth_(b)) {
    return b;
  }
  a = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  return cljs.core.truth_(a) ? a : "";
};
lt.objs.tabs.active_QMARK_ = function(a, b, c) {
  return[cljs.core.str(a), cljs.core.str(cljs.core._EQ_.call(null, cljs.core.deref.call(null, c).call(null, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)), b) ? " active" : null)].join("");
};
lt.objs.tabs.dirty_QMARK_ = function(a, b) {
  return[cljs.core.str(a), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) ? " dirty" : null)].join("");
};
lt.objs.tabs.close_tab = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.tab-close", "span.tab-close", 4094760846), "x"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close", "close", 1108660586));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.tabs.item = function(a, b, c, d) {
  b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "class", "class", 1108647146), lt.objs.tabs.dirty_QMARK_.call(null, lt.objs.tabs.active_QMARK_.call(null, " ", c, b), c), new cljs.core.Keyword(null, "draggable", "draggable", 709423359), "true", new cljs.core.Keyword(null, "title", "title", 1124275658), lt.objs.tabs.__GT_path.call(null, 
  c), new cljs.core.Keyword(null, "obj-id", "obj-id", 4285449507), lt.object.__GT_id.call(null, c), new cljs.core.Keyword(null, "pos", "pos", 1014015430), d], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.file-name", "span.file-name", 2230443530), lt.objs.tabs.__GT_name.call(null, c)], null), cljs.core.truth_(lt.object.raise_reduce.call(null, c, new cljs.core.Keyword(null, "close-button+", "close-button+", 3559586774), 
  !1)) ? lt.objs.tabs.close_tab.call(null, a) : null], null));
  d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "mouseup", "mouseup", 2256972146), function(a) {
    return cljs.core.truth_(function() {
      var b = cljs.core._EQ_.call(null, 1, a.button);
      return b ? b : a.metaKey;
    }()) ? lt.util.dom.prevent.call(null, a) : null;
  }, new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    return cljs.core.truth_(function() {
      var a = cljs.core._EQ_.call(null, 1, b.button);
      return a ? a : b.metaKey;
    }()) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close", "close", 1108660586)) : lt.objs.tabs.active_BANG_.call(null, c);
  }, new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }], null)));
  for (var e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, b, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, b, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-label", "lt.objs.tabs/tab-label", 914538750), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab-label", "tab-label", 1523548718), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b, c, d) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("lt.objs.tabs", "tab-object", "lt.objs.tabs/tab-object", 3521887033), c, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575), b], null));
  return lt.objs.tabs.item.call(null, a, b, c, d);
});
lt.objs.tabs.objs_list = function(a, b) {
  for (var c = cljs.core.filter.call(null, function(b) {
    return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), a);
  }, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "tab-label", "tab-label", 1523548718))), d = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), function() {
    return function(b) {
      return function n(c) {
        return new cljs.core.LazySeq(null, function(b) {
          return function() {
            for (var b = c;;) {
              if (b = cljs.core.seq.call(null, b)) {
                if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
                  var d = cljs.core.chunk_first.call(null, b), e = cljs.core.count.call(null, d), f = cljs.core.chunk_buffer.call(null, e);
                  a: {
                    for (var g = 0;;) {
                      if (g < e) {
                        var h = cljs.core._nth.call(null, d, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
                        cljs.core.truth_(cljs.core.deref.call(null, h)) && cljs.core.chunk_append.call(null, f, lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-label", "lt.objs.tabs/tab-label", 914538750), a, h, k)));
                        g += 1;
                      } else {
                        d = !0;
                        break a;
                      }
                    }
                    d = void 0;
                  }
                  return d ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), n.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), null);
                }
                d = cljs.core.first.call(null, b);
                f = cljs.core.nth.call(null, d, 0, null);
                d = cljs.core.nth.call(null, d, 1, null);
                if (cljs.core.truth_(cljs.core.deref.call(null, d))) {
                  return cljs.core.cons.call(null, lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-label", "lt.objs.tabs/tab-label", 914538750), a, d, f)), n.call(null, cljs.core.rest.call(null, b)));
                }
                b = cljs.core.rest.call(null, b);
              } else {
                return null;
              }
            }
          };
        }(b), null, null);
      };
    }(c).call(null, cljs.core.map.call(null, cljs.core.vector, cljs.core.range.call(null), b));
  }()], null)), e = cljs.core.seq.call(null, c), f = null, g = 0, h = 0;;) {
    if (h < g) {
      var k = cljs.core._nth.call(null, f, h);
      lt.object.destroy_BANG_.call(null, k);
      h += 1;
    } else {
      if (e = cljs.core.seq.call(null, e)) {
        f = e, cljs.core.chunked_seq_QMARK_.call(null, f) ? (e = cljs.core.chunk_first.call(null, f), h = cljs.core.chunk_rest.call(null, f), f = e, g = cljs.core.count.call(null, e), e = h) : (e = cljs.core.first.call(null, f), lt.object.destroy_BANG_.call(null, e), e = cljs.core.next.call(null, f), f = null, g = 0), h = 0;
      } else {
        break;
      }
    }
  }
  sortable(d, {axis:"x", distance:10, scroll:!1, opacity:0.9, connectWith:".list"});
  lt.util.dom.on.call(null, d, "contextmenu", function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  });
  lt.util.dom.on.call(null, d, "moved", function(b) {
    return lt.objs.tabs.move_tab.call(null, a, b.opts);
  });
  lt.util.dom.on.call(null, d, "sortupdate", function(b) {
    return lt.objs.tabs.update_tab_order.call(null, a, b.opts);
  });
  return d;
};
lt.objs.tabs.tabbed_item = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.content", "div.content", 3533478798), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "visibility", "visibility", 2955236996), crate.binding.bound.call(null, a, function(a) {
    return cljs.core._EQ_.call(null, a, cljs.core.deref.call(null, b)) ? "visible" : "hidden";
  })], null)], null), crate.binding.bound.call(null, b, function(a) {
    return cljs.core.truth_(a) ? lt.object.__GT_content.call(null, a) : null;
  })], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.tabs.vertical_grip = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.vertical-grip", "div.vertical-grip", 4287455262), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "draggable", "draggable", 709423359), "true"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "dragstart", "dragstart", 721070880), function(b) {
    b.dataTransfer.dropEffect = "move";
    b.dataTransfer.setData("text/plain", null);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649), b);
  }, new cljs.core.Keyword(null, "dragend", "dragend", 2926432921), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), b);
  }, new cljs.core.Keyword(null, "drag", "drag", 1016996006), function(b) {
    b.dataTransfer.dropEffect = "move";
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "width!", "width!", 4520836749), b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.tabs.__GT_perc = function(a) {
  return cljs.core.truth_(a) ? [cljs.core.str(a), cljs.core.str("%")].join("") : "0";
};
lt.objs.tabs.floored = function(a) {
  return 0 > a ? 0 : 100 < a ? 100 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? a : null;
};
lt.objs.tabs.to_perc = function(a, b) {
  return b / a * 100;
};
lt.objs.tabs.next_tabset = function(a) {
  var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576));
  return cljs.core.second.call(null, cljs.core.drop_while.call(null, function(b) {
    return cljs.core.not_EQ_.call(null, a, b);
  }, b));
};
lt.objs.tabs.prev_tabset = function(a) {
  var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576));
  return cljs.core.last.call(null, cljs.core.take_while.call(null, function(b) {
    return cljs.core.not_EQ_.call(null, a, b);
  }, b));
};
lt.objs.tabs.previous_tabset_width = function(a) {
  var b = cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576));
  return cljs.core.reduce.call(null, cljs.core._PLUS_, 0, cljs.core.map.call(null, cljs.core.comp.call(null, new cljs.core.Keyword(null, "width", "width", 1127031096), cljs.core.deref), cljs.core.take_while.call(null, function(b) {
    return cljs.core.not_EQ_.call(null, a, b);
  }, b)));
};
lt.objs.tabs.add_tabset = function(a) {
  lt.object.update_BANG_.call(null, lt.objs.tabs.multi, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)], null), cljs.core.conj, a);
  return lt.util.dom.append.call(null, (new cljs.core.Keyword(null, "tabsets-elem", "tabsets-elem", 4253111048)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)), lt.object.__GT_content.call(null, a));
};
lt.objs.tabs.spawn_tabset = function() {
  var a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)), b = 100 - cljs.core.reduce.call(null, cljs.core._PLUS_, cljs.core.map.call(null, cljs.core.comp.call(null, new cljs.core.Keyword(null, "width", "width", 1127031096), cljs.core.deref), cljs.core.deref.call(null, lt.objs.tabs.multi).call(null, new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576))));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), b], null));
  lt.objs.tabs.add_tabset.call(null, a);
  return a;
};
lt.objs.tabs.equalize_tabset_widths = function() {
  for (var a = (new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)), b = 100 / cljs.core.count.call(null, a), a = cljs.core.seq.call(null, a), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.merge_BANG_.call(null, f, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), b], null));
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), d = cljs.core.chunk_rest.call(null, c), c = a, f = cljs.core.count.call(null, a), a = d, d = f) : (f = cljs.core.first.call(null, c), lt.object.merge_BANG_.call(null, f, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), b], null)), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.tabs.temp_width = function(a, b) {
  return lt.util.dom.css.call(null, lt.object.__GT_content.call(null, a), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "width", "width", 1127031096), lt.objs.tabs.__GT_perc.call(null, b), new cljs.core.Keyword(null, "border-width", "border-width", 1324275799), cljs.core._EQ_.call(null, 0, b) ? 0 : ""], null));
};
lt.objs.tabs.activate_tabset = function(a) {
  if (cljs.core._EQ_.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)), a)) {
    return null;
  }
  var b = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  cljs.core.truth_(b) && lt.util.dom.remove_class.call(null, lt.object.__GT_content.call(null, b), new cljs.core.Keyword(null, "active", "active", 3885920888));
  lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575), a);
  lt.util.dom.add_class.call(null, lt.object.__GT_content.call(null, a), new cljs.core.Keyword(null, "active", "active", 3885920888));
  return!0;
};
lt.objs.tabs.tabset_ui = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tabset", "div.tabset", 2815514652), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "width", 
  "width", 1127031096)), lt.objs.tabs.__GT_perc)], null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.list", "div.list", 1323928397), crate.binding.bound.call(null, a, function(b) {
    return lt.objs.tabs.objs_list.call(null, a, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(b));
  })], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.items", "div.items", 2032262037), crate.binding.map_bound.call(null, cljs.core.partial.call(null, lt.objs.tabs.tabbed_item, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826))), a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "path", "path", 1017337751), new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "objs", "objs", 1017308622)], null)], null))], null), lt.objs.tabs.vertical_grip.call(null, a)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779), new cljs.core.Keyword(null, "objs", "objs", 1017308622), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826), null, new cljs.core.Keyword(null, "count", "count", 1108755585), 0, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"tabset", "tabset", 4427500575), null], null), null), new cljs.core.Keyword(null, "width", "width", 1127031096), 100, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.tabs.tabset_ui.call(null, a);
});
lt.objs.tabs.__GT_tabsets = function(a) {
  return function c(a) {
    return new cljs.core.LazySeq(null, function() {
      for (;;) {
        var e = cljs.core.seq.call(null, a);
        if (e) {
          if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
            var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
            a: {
              for (var k = 0;;) {
                if (k < g) {
                  var l = cljs.core._nth.call(null, f, k);
                  cljs.core.chunk_append.call(null, h, lt.object.__GT_content.call(null, l));
                  k += 1;
                } else {
                  f = !0;
                  break a;
                }
              }
              f = void 0;
            }
            return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
          }
          h = cljs.core.first.call(null, e);
          return cljs.core.cons.call(null, lt.object.__GT_content.call(null, h), c.call(null, cljs.core.rest.call(null, e)));
        }
        return null;
      }
    }, null, null);
  }.call(null, a);
};
lt.objs.tabs.tabset = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779));
lt.objs.tabs.add_BANG_ = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c = cljs.core.truth_(b) ? b : lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
    return cljs.core.truth_(c) ? (lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tabset.tab", "tabset.tab", 1444337222)], null)), lt.object.update_BANG_.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "objs", "objs", 1017308622)], null), cljs.core.conj, a), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 
    1, [new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779), c], null)), cljs.core.add_watch.call(null, crate.binding.subatom.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)], null)), new cljs.core.Keyword(null, "tabs", "tabs", 1017456368), function(a, b, d, e) {
      return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "tab.updated", "tab.updated", 2727558868));
    }), a) : null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.tabs.rem_tabset = function() {
  var a = null, b = function(b) {
    return a.call(null, b, !1);
  }, c = function(a, b) {
    var c = cljs.core.truth_(b) ? function() {
      var b = lt.objs.tabs.prev_tabset.call(null, a);
      return cljs.core.truth_(b) ? b : lt.objs.tabs.next_tabset.call(null, a);
    }() : function() {
      var b = lt.objs.tabs.next_tabset.call(null, a);
      return cljs.core.truth_(b) ? b : lt.objs.tabs.prev_tabset.call(null, a);
    }();
    if (cljs.core.truth_(c)) {
      lt.object.merge_BANG_.call(null, c, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), lt.objs.tabs.floored.call(null, (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)) + (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))], null));
      lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a));
      for (var g = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), h = null, k = 0, l = 0;;) {
        if (l < k) {
          var m = cljs.core._nth.call(null, h, l);
          lt.objs.tabs.add_BANG_.call(null, m, c);
          l += 1;
        } else {
          if (g = cljs.core.seq.call(null, g)) {
            h = g, cljs.core.chunked_seq_QMARK_.call(null, h) ? (g = cljs.core.chunk_first.call(null, h), l = cljs.core.chunk_rest.call(null, h), h = g, k = cljs.core.count.call(null, g), g = l) : (g = cljs.core.first.call(null, h), lt.objs.tabs.add_BANG_.call(null, g, c), g = cljs.core.next.call(null, h), h = null, k = 0), l = 0;
          } else {
            break;
          }
        }
      }
      lt.object.update_BANG_.call(null, lt.objs.tabs.multi, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)], null), function(b) {
        return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([a], !0), b));
      });
      lt.object.destroy_BANG_.call(null, a);
      lt.objs.tabs.equalize_tabset_widths.call(null);
      return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "active", "active", 3885920888));
    }
    return null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.tabs.rem_BANG_ = function(a) {
  if (cljs.core.truth_(function() {
    if (cljs.core.truth_(a)) {
      var b = cljs.core.deref.call(null, a);
      return cljs.core.truth_(b) ? (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : b;
    }
    return a;
  }())) {
    var b = (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c = lt.objs.tabs.__GT_index.call(null, a), d = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), e = lt.objs.tabs.__GT_index.call(null, d);
    cljs.core.remove_watch.call(null, a, new cljs.core.Keyword(null, "tabs", "tabs", 1017456368));
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779), null], null));
    lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "objs", "objs", 1017308622), cljs.core.vec.call(null, cljs.core.remove.call(null, function(b) {
      return cljs.core._EQ_.call(null, a, b);
    }, cljs.core.deref.call(null, b).call(null, new cljs.core.Keyword(null, "objs", "objs", 1017308622))))], null));
    if (cljs.core._EQ_.call(null, a, d)) {
      return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "tab", "tab", 1014018823), c);
    }
    if (cljs.core.not_EQ_.call(null, e, lt.objs.tabs.__GT_index.call(null, d))) {
      return lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826), null], null)), lt.objs.tabs.active_BANG_.call(null, d);
    }
  }
  return null;
};
lt.objs.tabs.refresh_BANG_ = function(a) {
  a = (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "tab.updated", "tab.updated", 2727558868)) : null;
};
lt.objs.tabs.in_tab_QMARK_ = function(a) {
  return cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779));
};
lt.objs.tabs.add_or_focus_BANG_ = function(a) {
  cljs.core.truth_(lt.objs.tabs.in_tab_QMARK_.call(null, a)) || lt.objs.tabs.add_BANG_.call(null, a);
  return lt.objs.tabs.active_BANG_.call(null, a);
};
lt.objs.tabs.num_tabs = function() {
  return cljs.core.reduce.call(null, function(a, b) {
    return a + cljs.core.count.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  }, 0, (new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)));
};
lt.objs.tabs.active_tab = function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  return cljs.core.truth_(a) ? (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : null;
};
lt.objs.tabs.move_tab_to_tabset = function(a, b) {
  lt.objs.tabs.rem_BANG_.call(null, a);
  lt.objs.tabs.add_BANG_.call(null, a, b);
  lt.objs.tabs.active_BANG_.call(null, a);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move", "move", 1017261891));
};
lt.objs.tabs.move_tab = function(a, b) {
  var c = lt.util.dom.attr.call(null, b, new cljs.core.Keyword(null, "obj-id", "obj-id", 4285449507)), d = lt.util.dom.index.call(null, b), c = lt.object.by_id.call(null, parseInt(c)), e = cljs.core.count.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  lt.objs.tabs.rem_BANG_.call(null, c);
  lt.objs.tabs.add_BANG_.call(null, c, a);
  0 < e && lt.objs.tabs.update_tab_order.call(null, a, cljs.core.vec.call(null, cljs.core.concat.call(null, cljs.core.range.call(null, d), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), cljs.core.range.call(null, d, e))));
  lt.objs.tabs.active_BANG_.call(null, c);
  return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "move", "move", 1017261891));
};
lt.objs.tabs.__BEH__on_destroy_remove = function(a) {
  return lt.objs.tabs.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "on-destroy-remove", "lt.objs.tabs/on-destroy-remove", 1369860715), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__on_destroy_remove, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null, new cljs.core.Keyword(null, "closed", "closed", 
3951351006), null], null), null));
lt.objs.tabs.__BEH__active_tab_num = function(a, b) {
  var c = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "objs", "objs", 1017308622));
  return b < cljs.core.count.call(null, c) ? lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, c, b)) : lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, c, cljs.core.count.call(null, c) - 1));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "active-tab-num", "lt.objs.tabs/active-tab-num", 3859758153), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__active_tab_num, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab", "tab", 1014018823), null], null), null));
lt.objs.tabs.__BEH__prev_tab = function(a) {
  var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "objs", "objs", 1017308622));
  a = lt.objs.tabs.__GT_index.call(null, (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return 0 < a ? lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, b, a - 1)) : lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, b, cljs.core.count.call(null, b) - 1));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "prev-tab", "lt.objs.tabs/prev-tab", 3503997629), new cljs.core.Keyword(null, "throttle", "throttle", 2497347228), 100, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__prev_tab, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab.prev", "tab.prev", 4356539486), null], 
null), null));
lt.objs.tabs.__BEH__next_tab = function(a) {
  var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "objs", "objs", 1017308622));
  a = lt.objs.tabs.__GT_index.call(null, (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) + 1;
  return a < cljs.core.count.call(null, b) ? lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, b, a)) : lt.objs.tabs.active_BANG_.call(null, cljs.core.get.call(null, b, 0));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "next-tab", "lt.objs.tabs/next-tab", 4026023933), new cljs.core.Keyword(null, "throttle", "throttle", 2497347228), 100, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__next_tab, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab.next", "tab.next", 4356467998), null], 
null), null));
lt.objs.tabs.__BEH__tab_close = function(a) {
  try {
    var b = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "close", "close", 1108660586));
  } catch (c) {
    return lt.objs.console.error(c);
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-close", "lt.objs.tabs/tab-close", 921329682), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tab_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab.close", "tab.close", 1544206801), null], null), null));
lt.objs.tabs.__BEH__on_destroy_objs = function(a) {
  a = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.object.destroy_BANG_.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.object.destroy_BANG_.call(null, e), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "on-destroy-objs", "lt.objs.tabs/on-destroy-objs", 2776869971), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__on_destroy_objs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null], null), null));
lt.objs.tabs.__BEH__repaint_tab_updated = function(a) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "count", "count", 1108755585)], null), cljs.core.inc);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "repaint-tab-updated", "lt.objs.tabs/repaint-tab-updated", 1521843223), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__repaint_tab_updated, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab.updated", "tab.updated", 2727558868), null], null), null));
lt.objs.tabs.__BEH__no_anim_on_drag = function(a) {
  return lt.objs.animations.off.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "no-anim-on-drag", "lt.objs.tabs/no-anim-on-drag", 2746913928), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__no_anim_on_drag, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649), null], null), null));
lt.objs.tabs.__BEH__reanim_on_drop = function(a) {
  return lt.objs.animations.on.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "reanim-on-drop", "lt.objs.tabs/reanim-on-drop", 2109600678), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__reanim_on_drop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), null], null), null));
lt.objs.tabs.__BEH__set_dragging = function(a) {
  return lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "dragging", "dragging", 4467773633));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "set-dragging", "lt.objs.tabs/set-dragging", 3265197408), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__set_dragging, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649), null], null), null));
lt.objs.tabs.__BEH__unset_dragging = function(a) {
  return lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), new cljs.core.Keyword(null, "dragging", "dragging", 4467773633));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "unset-dragging", "lt.objs.tabs/unset-dragging", 4764787269), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__unset_dragging, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), null], null), null));
lt.objs.tabs.__BEH__set_width_final_BANG_ = function(a, b) {
  var c = lt.objs.tabs.next_tabset.call(null, a);
  if (cljs.core.truth_(c)) {
    var d = lt.util.dom.width.call(null, lt.object.__GT_content.call(null, lt.objs.tabs.multi)), e = (new cljs.core.Keyword(null, "left", "left", 1017222009)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)), f = b.clientX, e = d + e - f, d = lt.objs.tabs.floored.call(null, 100 - lt.objs.tabs.previous_tabset_width.call(null, a) - lt.objs.tabs.to_perc.call(null, d, e) | 0), e = (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
    a)), g = d >= (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)) + e ? (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)) + e : d, h = lt.objs.tabs.floored.call(null, cljs.core.not.call(null, c) ? 1 : (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)) + (e - g));
    if (cljs.core._EQ_.call(null, g, 0)) {
      return lt.objs.tabs.rem_tabset.call(null, a);
    }
    if (cljs.core._EQ_.call(null, h, 0)) {
      return lt.objs.tabs.rem_tabset.call(null, c, new cljs.core.Keyword(null, "prev", "prev", 1017353637));
    }
    if (new cljs.core.Keyword(null, "else", "else", 1017020587)) {
      if (cljs.core._EQ_.call(null, f, 0)) {
        return null;
      }
      if (0 > g) {
        return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), 100], null));
      }
      if (cljs.core.truth_(function() {
        var a = cljs.core.not_EQ_.call(null, f, 0);
        return a ? cljs.core.truth_(c) ? 0 <= g && 0 <= h : c : a;
      }())) {
        return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), g], null)), cljs.core.truth_(c) ? lt.object.merge_BANG_.call(null, c, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), h], null)) : lt.objs.tabs.spawn_tabset.call(null);
      }
    }
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "set-width-final!", "lt.objs.tabs/set-width-final!", 4331804915), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__set_width_final_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), null], null), null));
lt.objs.tabs.__BEH__width_BANG_ = function(a, b) {
  var c = lt.util.dom.width.call(null, lt.object.__GT_content.call(null, lt.objs.tabs.multi)), d = (new cljs.core.Keyword(null, "left", "left", 1017222009)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)), e = b.clientX, d = c + d - e, c = lt.objs.tabs.floored.call(null, 100 - lt.objs.tabs.previous_tabset_width.call(null, a) - lt.objs.tabs.to_perc.call(null, c, d) | 0), d = (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a)), f = lt.objs.tabs.next_tabset.call(null, a), g = cljs.core.truth_(cljs.core.truth_(f) ? c >= (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, f)) + d : f) ? (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, f)) + d : c, h = lt.objs.tabs.floored.call(null, cljs.core.not.call(null, f) ? 1 : (new cljs.core.Keyword(null, "width", "width", 1127031096)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  f)) + (d - g));
  return cljs.core._EQ_.call(null, e, 0) ? null : 0 > g ? lt.objs.tabs.temp_width.call(null, a, 100) : cljs.core.truth_(function() {
    var a = cljs.core.not_EQ_.call(null, e, 0);
    return a ? cljs.core.truth_(f) ? 0 <= g && 0 <= h : f : a;
  }()) ? (lt.objs.tabs.temp_width.call(null, a, g), cljs.core.truth_(f) ? lt.objs.tabs.temp_width.call(null, f, h) : lt.objs.tabs.spawn_tabset.call(null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "width!", "lt.objs.tabs/width!", 1942600349), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__width_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width!", "width!", 4520836749), null], null), null));
lt.objs.tabs.__BEH__tab_active = function(a) {
  return lt.objs.tabs.activate_tabset.call(null, (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-active", "lt.objs.tabs/tab-active", 3117606804), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tab_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.tabs.__BEH__tab_label_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Move tab to new tabset", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "tabs.move-new-tabset", "tabs.move-new-tabset", 1394582008), (new cljs.core.Keyword("lt.objs.tabs", "tab-object", "lt.objs.tabs/tab-object", 3521887033)).cljs$core$IFn$_invoke$arity$1(a));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Close tab", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close", "close", 1108660586));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tab-label-menu+", "lt.objs.tabs/tab-label-menu+", 3717573469), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tab_label_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.tabs.__BEH__on_close_tab_label = function(a) {
  var b = (new cljs.core.Keyword("lt.objs.tabs", "tab-object", "lt.objs.tabs/tab-object", 3521887033)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.truth_(b) && lt.object.raise.call(null, b, new cljs.core.Keyword(null, "close", "close", 1108660586));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "on-close-tab-label", "lt.objs.tabs/on-close-tab-label", 1131551871), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__on_close_tab_label, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.tabs.__BEH__tabset_active = function(a) {
  return cljs.core.truth_(lt.objs.tabs.activate_tabset.call(null, a)) ? (a = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819)) : null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset-active", "lt.objs.tabs/tabset-active", 1106535340), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tabset_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.tabs.__BEH__tabset_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "New tabset", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "tabset.new", "tabset.new", 1444331601));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Close tabset", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.tabs.rem_tabset.call(null, a);
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset-menu+", "lt.objs.tabs/tabset-menu+", 1202208846), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tabset_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.tabs.__BEH__left_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "left", "left", 1017222009)], null), cljs.core._PLUS_, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "left!", "lt.objs.tabs/left!", 2125172416), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__left_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "left!", "left!", 1116755052), null], null), null));
lt.objs.tabs.__BEH__right_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "right", "right", 1122416014)], null), cljs.core._PLUS_, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "right!", "lt.objs.tabs/right!", 3429024843), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__right_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "right!", "right!", 4377769207), null], null), null));
lt.objs.tabs.__BEH__bottom_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "bottom", "bottom", 3925642653)], null), cljs.core._PLUS_, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "bottom!", "lt.objs.tabs/bottom!", 2158565980), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__bottom_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "bottom!", "bottom!", 1083481800), null], null), null));
lt.objs.tabs.__BEH__tabset_bottom_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tabset-bottom", "tabset-bottom", 2176185021)], null), cljs.core._PLUS_, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "tabset-bottom!", "lt.objs.tabs/tabset-bottom!", 3779353980), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__tabset_bottom_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tabset-bottom!", "tabset-bottom!", 2684870056), null], null), null));
lt.objs.tabs.__BEH__init_sortable = function(a) {
  return initSortable(window);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "init-sortable", "lt.objs.tabs/init-sortable", 4237069211), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__init_sortable, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.tabs.__BEH__init = function(a) {
  lt.objs.tabs.add_tabset.call(null, lt.objs.tabs.tabset);
  return lt.object.raise.call(null, lt.objs.tabs.tabset, new cljs.core.Keyword(null, "active", "active", 3885920888));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "init", "lt.objs.tabs/init", 2224810146), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.tabs.__BEH__show_close_button = function(a) {
  return!0;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.tabs", "show-close-button", "lt.objs.tabs/show-close-button", 2366934073), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.tabs.__BEH__show_close_button, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Show close button on tabs", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"close-button+", "close-button+", 3559586774), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.move-new-tabset", "tabs.move-new-tabset", 1394582008), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Move tab to new tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  return cljs.core.truth_(b) && (a = cljs.core.truth_(a) ? a : cljs.core.deref.call(null, b).call(null, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)), cljs.core.truth_(a)) ? (b = lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "tabset.new", "tabset.new", 1444331601)), lt.objs.tabs.move_tab_to_tabset.call(null, a, b)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.move-next-tabset", "tabs.move-next-tabset", 3557293229), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Move tab to next tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  if (cljs.core.truth_(a)) {
    var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)), c;
    c = lt.objs.tabs.next_tabset.call(null, a);
    c = cljs.core.truth_(c) ? c : lt.objs.tabs.prev_tabset.call(null, a);
    return cljs.core.truth_(cljs.core.truth_(b) ? cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c : b) ? lt.objs.tabs.move_tab_to_tabset.call(null, b, c) : null;
  }
  return null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.move-prev-tabset", "tabs.move-prev-tabset", 876232045), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Move tab to previous tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  if (cljs.core.truth_(a)) {
    var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)), c;
    c = lt.objs.tabs.prev_tabset.call(null, a);
    c = cljs.core.truth_(c) ? c : lt.objs.tabs.next_tabset.call(null, a);
    return cljs.core.truth_(cljs.core.truth_(b) ? cljs.core.truth_(c) ? cljs.core.not_EQ_.call(null, c, a) : c : b) ? lt.objs.tabs.move_tab_to_tabset.call(null, b, c) : null;
  }
  return null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.next", "tabs.next", 3470721749), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Next tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)), new cljs.core.Keyword(null, "tab.next", "tab.next", 4356467998));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.prev", "tabs.prev", 3470793237), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Previous tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)), new cljs.core.Keyword(null, "tab.prev", "tab.prev", 4356539486));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.close", "tabs.close", 4150844154), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Close current tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  cljs.core._EQ_.call(null, 0, lt.objs.tabs.num_tabs.call(null)) && lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "window.close", "window.close", 3118917100));
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575));
  return cljs.core.truth_(a) ? cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    return cljs.core.truth_(b) ? cljs.core.deref.call(null, (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : b;
  }()) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "tab.close", "tab.close", 1544206801)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.close-all", "tabs.close-all", 2444215630), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabs: Close all tabs", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  for (var a = lt.object.by_tag.call(null, new cljs.core.Keyword(null, "tabset.tab", "tabset.tab", 1444337222)), a = cljs.core.seq.call(null, a), b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.object.raise.call(null, e, new cljs.core.Keyword(null, "close", "close", 1108660586));
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.object.raise.call(null, e, new cljs.core.Keyword(null, "close", "close", 1108660586)), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.close-others", "tabs.close-others", 1458098362), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabs: Close tabs except current tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  for (var a = lt.objs.tabs.active_tab.call(null), b = lt.object.by_tag.call(null, new cljs.core.Keyword(null, "tabset.tab", "tabset.tab", 1444337222)), b = cljs.core.seq.call(null, b), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      a !== f && lt.object.raise.call(null, f, new cljs.core.Keyword(null, "close", "close", 1108660586));
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), d = cljs.core.chunk_rest.call(null, c), c = b, f = cljs.core.count.call(null, b), b = d, d = f) : (f = cljs.core.first.call(null, c), a !== f && lt.object.raise.call(null, f, new cljs.core.Keyword(null, "close", "close", 1108660586)), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        return null;
      }
    }
  }
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.goto", "tabs.goto", 3470522693), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: Goto tab # or :last", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)), b = cljs.core.count.call(null, (new cljs.core.Keyword(null, "objs", "objs", 1017308622)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) - 1;
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)), new cljs.core.Keyword(null, "tab", "tab", 1014018823), cljs.core._EQ_.call(null, a, new cljs.core.Keyword(null, "last", "last", 1017218568)) ? b : a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabset.next", "tabset.next", 1472250630), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabset: Next tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.tabs.next_tabset.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)));
  if (cljs.core.truth_(a)) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }
  a = cljs.core.get.call(null, (new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)), 0);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabset.prev", "tabset.prev", 1472322118), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabset: Previous tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.tabs.prev_tabset.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)));
  if (cljs.core.truth_(a)) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }
  a = cljs.core.last.call(null, (new cljs.core.Keyword(null, "tabsets", "tabsets", 3756175576)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabset.close", "tabset.close", 2327781609), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabset: Remove active tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.objs.tabs.rem_tabset.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575)));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabset.new", "tabset.new", 1444331601), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tabset: Add a tabset", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.tabs.spawn_tabset.call(null);
  lt.objs.tabs.equalize_tabset_widths.call(null);
  return a;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "tabs.focus-active", "tabs.focus-active", 2001074557), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Tab: focus active", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = (new cljs.core.Keyword(null, "active-obj", "active-obj", 3056705826)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tabset", "tabset", 4427500575))));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819)) : null;
}], null));
lt.util.dom.append.call(null, lt.object.__GT_content.call(null, lt.objs.canvas.canvas), (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.tabs.multi)));
lt.objs.sidebar = {};
lt.objs.sidebar.default_width = 200;
lt.objs.sidebar.vertical_grip = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.vertical-grip", "div.vertical-grip", 4287455262), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "draggable", "draggable", 709423359), "true"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "dragstart", "dragstart", 721070880), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649));
  }, new cljs.core.Keyword(null, "dragend", "dragend", 2926432921), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352));
  }, new cljs.core.Keyword(null, "drag", "drag", 1016996006), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "width!", "width!", 4520836749), b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.__BEH__no_anim_on_drag = function(a) {
  return lt.objs.animations.off.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "no-anim-on-drag", "lt.objs.sidebar/no-anim-on-drag", 527757360), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__no_anim_on_drag, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649), null], null), null));
lt.objs.sidebar.__BEH__reanim_on_drop = function(a) {
  return lt.objs.animations.on.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "reanim-on-drop", "lt.objs.sidebar/reanim-on-drop", 3916270162), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__reanim_on_drop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), null], null), null));
lt.objs.sidebar.__BEH__width_BANG_ = function(a, b) {
  if (cljs.core._EQ_.call(null, 0, b.clientX)) {
    return null;
  }
  var c = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "side", "side", 1017434313)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "left", "left", 1017222009)) ? b.clientX : lt.util.dom.width.call(null, document.body) - b.clientX;
  lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, new cljs.core.PersistentArrayMap.fromArray([(new cljs.core.Keyword(null, "side", "side", 1017434313)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c], !0, !1));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "width", "width", 1127031096), c, new cljs.core.Keyword(null, "max-width", "max-width", 3646439311), c], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "width!", "lt.objs.sidebar/width!", 4013537593), new cljs.core.Keyword(null, "throttle", "throttle", 2497347228), 5, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__width_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width!", "width!", 4520836749), 
null], null), null));
lt.objs.sidebar.__BEH__pop_transient = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "pop-transient", "lt.objs.sidebar/pop-transient", 4385987660), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__pop_transient, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pop!", "pop!", 1017351010), null], null), null));
lt.objs.sidebar.__BEH__open_BANG_ = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "width", "width", 1127031096), (new cljs.core.Keyword(null, "max-width", "max-width", 3646439311)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null));
  lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, new cljs.core.PersistentArrayMap.fromArray([(new cljs.core.Keyword(null, "side", "side", 1017434313)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "max-width", "max-width", 3646439311)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], !0, !1));
  return lt.util.dom.add_class.call(null, lt.object.__GT_content.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), new cljs.core.Keyword(null, "active", "active", 3885920888));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "open!", "lt.objs.sidebar/open!", 3098362197), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__open_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", "open!", 1119852169), null], null), null));
lt.objs.sidebar.__BEH__close_BANG_ = function(a, b) {
  cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && lt.util.dom.remove_class.call(null, lt.object.__GT_content.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), new cljs.core.Keyword(null, "active", "active", 3885920888));
  lt.object.merge_BANG_.call(null, lt.objs.tabs.multi, new cljs.core.PersistentArrayMap.fromArray([(new cljs.core.Keyword(null, "side", "side", 1017434313)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), 0], !0, !1));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "width", "width", 1127031096), 0, new cljs.core.Keyword(null, "active", "active", 3885920888), !1, new cljs.core.Keyword(null, "open", "open", 1017321916), !1], null));
  return cljs.core.truth_(b) ? null : lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "tabs.focus-active", "tabs.focus-active", 2001074557));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "close!", "lt.objs.sidebar/close!", 1365770055), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__close_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], null), null));
lt.objs.sidebar.__BEH__item_toggled = function(a, b, c) {
  c = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c;
  var d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "soft?", "soft?", 1123517639));
  cljs.core.get.call(null, c, new cljs.core.Keyword(null, "transient?", "transient?", 3584270951));
  var e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "force?", "force?", 4040082982));
  return cljs.core.truth_(function() {
    var c = cljs.core.not.call(null, e);
    return c ? (c = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b)) ? (new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : c : c;
  }()) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939)) : cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b) ? (cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && lt.util.dom.remove_class.call(null, lt.object.__GT_content.call(null, (new cljs.core.Keyword(null, 
  "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), new cljs.core.Keyword(null, "active", "active", 3885920888)), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), b], null)), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "open!", "open!", 1119852169)), cljs.core.truth_(d) ? null : lt.object.raise.call(null, b, new cljs.core.Keyword(null, "show", "show", 
  1017433711))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "item-toggled", "lt.objs.sidebar/item-toggled", 2718235028), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.__BEH__item_toggled, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), null], null), null));
lt.objs.sidebar.active_content = function(a) {
  return cljs.core.truth_(a) ? lt.object.__GT_content.call(null, a) : null;
};
lt.objs.sidebar.__GT_width = function(a) {
  return[cljs.core.str(cljs.core.truth_(a) ? a : 0), cljs.core.str("px")].join("");
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "sidebar", "lt.objs.sidebar/sidebar", 2323919354), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar", "sidebar", 3099131598), null], null), null), new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "width", "width", 1127031096), 
0, new cljs.core.Keyword(null, "side", "side", 1017434313), new cljs.core.Keyword(null, "left", "left", 1017222009), new cljs.core.Keyword(null, "transients", "transients", 3584271003), cljs.core.List.EMPTY, new cljs.core.Keyword(null, "max-width", "max-width", 3646439311), lt.objs.sidebar.default_width, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#side", "div#side", 1313977723), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "width", "width", 1127031096)), lt.objs.sidebar.__GT_width)], 
  null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.content", "div.content", 3533478798), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888)), lt.objs.sidebar.active_content)], null), lt.objs.sidebar.vertical_grip.call(null, a)], null);
});
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar", "right-bar", "lt.objs.sidebar/right-bar", 614062976), new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar", "sidebar", 3099131598), null], null), null), new cljs.core.Keyword(null, "width", "width", 1127031096), 
0, new cljs.core.Keyword(null, "side", "side", 1017434313), new cljs.core.Keyword(null, "right", "right", 1122416014), new cljs.core.Keyword(null, "max-width", "max-width", 3646439311), 300, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#right-bar", "div#right-bar", 961966818), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "width", "width", 1127031096)), lt.objs.sidebar.__GT_width)], 
  null)], null), lt.objs.sidebar.vertical_grip.call(null, a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.content", "div.content", 3533478798)], null)], null);
});
lt.objs.sidebar.sidebar = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar", "sidebar", "lt.objs.sidebar/sidebar", 2323919354));
lt.objs.sidebar.rightbar = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar", "right-bar", "lt.objs.sidebar/right-bar", 614062976));
lt.objs.canvas.add_BANG_.call(null, lt.objs.sidebar.sidebar);
lt.objs.canvas.add_BANG_.call(null, lt.objs.sidebar.rightbar);
lt.objs.sidebar.add_item = function(a, b) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "items", "items", 1114430258)], null), cljs.core.assoc, (new cljs.core.Keyword(null, "order", "order", 1119910592)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), b);
  return lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".content", ".content", 530331645), lt.object.__GT_content.call(null, a)), lt.object.__GT_content.call(null, b));
};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "close-sidebar", "close-sidebar", 1108494329), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Sidebar: close", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
}], null));
lt.objs.sidebar.command = {};
lt.util.load.js.call(null, "core/node_modules/lighttable/util/fuzzy.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
lt.objs.sidebar.command.__BEH__op_select_BANG_ = function(a, b) {
  var c = lt.object.__GT_content.call(null, a);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select", "select", 4402849902), lt.util.dom.val.call(null, c));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selected", "selected", 2205476365));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "op-select!", "lt.objs.sidebar.command/op-select!", 3738729249), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__op_select_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select!", "select!", 2992004631), null], null), null));
lt.objs.sidebar.command.__BEH__op_clear_BANG_ = function(a) {
  var b = lt.object.__GT_content.call(null, a);
  lt.util.dom.val.call(null, b, "");
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "change!", "change!", 1752847843), "");
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "op-clear!", "lt.objs.sidebar.command/op-clear!", 4705248442), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__op_clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.sidebar.command.__BEH__op_focus_BANG_ = function(a) {
  a = lt.object.__GT_content.call(null, a);
  lt.util.dom.focus.call(null, a);
  return a.select();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "op-focus!", "lt.objs.sidebar.command/op-focus!", 597430821), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__op_focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.sidebar.command.__GT_value = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "value", "value", 1125876963));
  return cljs.core.not.call(null, a) ? "" : a;
};
lt.objs.sidebar.command.input__GT_value = function(a) {
  return lt.util.dom.val.call(null, lt.object.__GT_content.call(null, a));
};
lt.objs.sidebar.command.op_input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.option", "input.option", 1495945867), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013)), new cljs.core.Keyword(null, 
  "value", "value", 1125876963), crate.binding.bound.call(null, a, lt.objs.sidebar.command.__GT_value)], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function(b) {
    lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "options-input", "options-input", 2975266637), a);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function(b) {
    lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "options-input", "options-input", 2975266637), a);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  }, new cljs.core.Keyword(null, "keyup", "keyup", 1115849900), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "change!", "change!", 1752847843), lt.util.dom.val.call(null, this));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "options-input", "lt.objs.sidebar.command/options-input", 3682181571), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "options-input", "options-input", 2975266637), null], null), null), new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "search", new cljs.core.Keyword(null, "init", 
"init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, b);
  return lt.objs.sidebar.command.op_input.call(null, a);
});
lt.objs.sidebar.command.options_input = function(a) {
  a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "options-input", "lt.objs.sidebar.command/options-input", 3682181571), a);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  return a;
};
lt.objs.sidebar.command.input_val = function(a) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)));
};
lt.objs.sidebar.command.set_val = function(a, b) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)), b);
};
lt.objs.sidebar.command.set_and_select = function(a, b) {
  lt.objs.sidebar.command.set_val.call(null, a, b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "change!", "change!", 1752847843), b);
};
lt.objs.sidebar.command.ensure_visible = function(a) {
  a = lt.util.dom.$.call(null, "ul", lt.object.__GT_content.call(null, a));
  var b = lt.util.dom.$.call(null, ".selected", a);
  if (b.offsetTop < a.scrollTop) {
    return a.scrollTop = b.offsetTop - 15;
  }
  if (b.offsetTop + b.offsetHeight > a.scrollTop + a.clientHeight) {
    return a.scrollTop = b.offsetTop + b.offsetHeight + 15 - a.clientHeight;
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
lt.objs.sidebar.command.fill_lis = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "transform", "transform", 2066570974));
  cljs.core.get.call(null, c, new cljs.core.Keyword(null, "key", "key", 1014010321));
  var e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "selected", "selected", 2205476365)), f = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "search", "search", 4402534682)), g = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "size", "size", 1017434995)), h = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "lis", "lis", 1014011400)), k = cljs.core.count.call(null, b), e = cljs.core.mod.call(null, e, k > g ? g : k), d = cljs.core.truth_(d) ? d : function(a, 
  b) {
    return function(a, b, c) {
      return c;
    };
  }(k, e);
  cljs.core._EQ_.call(null, k, 0) ? lt.util.dom.add_class.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "empty", "empty", 1110538431)) : lt.util.dom.remove_class.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "empty", "empty", 1110538431));
  for (var c = cljs.core.seq.call(null, cljs.core.map.call(null, cljs.core.vector, cljs.core.range.call(null), h, b)), g = null, l = 0, m = 0;;) {
    if (m < l) {
      var n = cljs.core._nth.call(null, g, m), p = cljs.core.nth.call(null, n, 0, null), q = cljs.core.nth.call(null, n, 1, null), n = cljs.core.nth.call(null, n, 2, null);
      cljs.core.truth_(n) && (lt.util.dom.html.call(null, q, d.call(null, n[1], n[4], cljs.core.empty_QMARK_.call(null, f) ? n[1] : wrapMatch(n[1], n[4]), n[0])), lt.util.dom.css.call(null, q, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "display", "display", 2685668404), "block"], null)), cljs.core._EQ_.call(null, p, e) ? lt.util.dom.add_class.call(null, q, new cljs.core.Keyword(null, "selected", "selected", 2205476365)) : lt.util.dom.remove_class.call(null, q, new cljs.core.Keyword(null, 
      "selected", "selected", 2205476365)));
      m += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (l = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), g = l, l = cljs.core.count.call(null, l)) : (m = cljs.core.first.call(null, c), g = cljs.core.nth.call(null, m, 0, null), l = cljs.core.nth.call(null, m, 1, null), m = cljs.core.nth.call(null, m, 2, null), cljs.core.truth_(m) && (lt.util.dom.html.call(null, l, d.call(null, m[1], m[4], cljs.core.empty_QMARK_.call(null, f) ? m[1] : wrapMatch(m[1], m[4]), m[0])), lt.util.dom.css.call(null, 
        l, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "display", "display", 2685668404), "block"], null)), cljs.core._EQ_.call(null, g, e) ? lt.util.dom.add_class.call(null, l, new cljs.core.Keyword(null, "selected", "selected", 2205476365)) : lt.util.dom.remove_class.call(null, l, new cljs.core.Keyword(null, "selected", "selected", 2205476365))), c = cljs.core.next.call(null, c), g = null, l = 0), m = 0;
      } else {
        break;
      }
    }
  }
  f = cljs.core.seq.call(null, cljs.core.drop.call(null, k, h));
  h = null;
  for (d = e = 0;;) {
    if (d < e) {
      k = cljs.core._nth.call(null, h, d), lt.util.dom.css.call(null, k, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "display", "display", 2685668404), "none"], null)), d += 1;
    } else {
      if (f = cljs.core.seq.call(null, f)) {
        h = f, cljs.core.chunked_seq_QMARK_.call(null, h) ? (f = cljs.core.chunk_first.call(null, h), e = cljs.core.chunk_rest.call(null, h), h = f, k = cljs.core.count.call(null, f), f = e, e = k) : (k = cljs.core.first.call(null, h), lt.util.dom.css.call(null, k, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "display", "display", 2685668404), "none"], null)), f = cljs.core.next.call(null, h), h = null, e = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.sidebar.command.__BEH__move_selection = function(a, b) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set-selection!", "set-selection!", 4610208210), b + (new cljs.core.Keyword(null, "selected", "selected", 2205476365)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.objs.sidebar.command.ensure_visible.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "move-selection", "lt.objs.sidebar.command/move-selection", 3585134442), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__move_selection, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move-selection", "move-selection", 2808852994), null], null), 
null));
lt.objs.sidebar.command.__BEH__set_selection_BANG_ = function(a, b) {
  var c = cljs.core.count.call(null, (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = 0 < c ? cljs.core.mod.call(null, b, c > (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) ? (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : c) : null;
  if (cljs.core.truth_(c)) {
    var d = cljs.core.nth.call(null, (new cljs.core.Keyword(null, "lis", "lis", 1014011400)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "selected", "selected", 2205476365)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), e = cljs.core.nth.call(null, (new cljs.core.Keyword(null, "lis", "lis", 1014011400)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c);
    if (cljs.core.truth_(e)) {
      return lt.util.dom.remove_class.call(null, d, new cljs.core.Keyword(null, "selected", "selected", 2205476365)), lt.util.dom.add_class.call(null, e, new cljs.core.Keyword(null, "selected", "selected", 2205476365)), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), c], null));
    }
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "set-selection!", "lt.objs.sidebar.command/set-selection!", 991317818), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__set_selection_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set-selection!", "set-selection!", 4610208210), null], 
null), null));
lt.objs.sidebar.command.__BEH__change_BANG_ = function(a, b) {
  var c = lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "change+", "change+", 1752847853), b);
  if (cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c)) {
    return null;
  }
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), 0, new cljs.core.Keyword(null, "search", "search", 4402534682), c], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "change!", "lt.objs.sidebar.command/change!", 2493907785), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__change_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "change!", "change!", 1752847843), null], null), null));
lt.objs.sidebar.command.__BEH__escape_BANG_ = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "close-sidebar", "close-sidebar", 1108494329));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "escape!", "lt.objs.sidebar.command/escape!", 4419624474), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__escape_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "escape!", "escape!", 3844244274), null], null), null));
lt.objs.sidebar.command.__BEH__options_escape_BANG_ = function(a) {
  lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "cancel!", "cancel!", 1564120153));
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "close-sidebar", "close-sidebar", 1108494329));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "options-escape!", "lt.objs.sidebar.command/options-escape!", 1907886697), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__options_escape_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "escape!", "escape!", 3844244274), null], null), 
null));
lt.objs.sidebar.command.__BEH__set_on_select = function(a, b) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "set-on-select", "set-on-select", 3587180657)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.objs.sidebar.command.set_val.call(null, a, (new cljs.core.Keyword(null, "key", "key", 1014010321)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).call(null, b)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "set-on-select", "lt.objs.sidebar.command/set-on-select", 4160534751), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__set_on_select, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.objs.sidebar.command.__BEH__select_BANG_ = function(a, b) {
  var c = lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a)), d = cljs.core.count.call(null, c), e;
  e = cljs.core.truth_(b) ? b : (new cljs.core.Keyword(null, "selected", "selected", 2205476365)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  e = cljs.core.mod.call(null, e, d > (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) ? (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : d);
  return 0 < d ? (lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select", "select", 4402849902), c[e][0]), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selected", "selected", 2205476365))) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select-unknown", "select-unknown", 2733767659), lt.objs.sidebar.command.input_val.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "select!", "lt.objs.sidebar.command/select!", 3665427221), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__select_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select!", "select!", 2992004631), null], null), null));
lt.objs.sidebar.command.__BEH__filter_active = function(a) {
  return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "filter-active", "lt.objs.sidebar.command/filter-active", 3579569891), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__filter_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.sidebar.command.__BEH__filter_inactive = function(a) {
  return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "filter-inactive", "lt.objs.sidebar.command/filter-inactive", 2320829050), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__filter_inactive, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "inactive", "inactive", 1038569437), null], null), null));
lt.objs.sidebar.command.__BEH__clear_BANG_ = function(a) {
  var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  lt.util.dom.val.call(null, b, "");
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "change!", "change!", 1752847843), "");
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "clear!", "lt.objs.sidebar.command/clear!", 4593594982), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_BANG_ = function(a) {
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a));
  lt.util.dom.focus.call(null, a);
  return a.select();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "filter-list.focus!", "lt.objs.sidebar.command/filter-list.focus!", 1166243638), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__filter_list__DOT__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], 
null), null));
lt.objs.sidebar.command.__BEH__update_lis = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cur", "cur", 1014003122), lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a))], null));
  return lt.objs.sidebar.command.fill_lis.call(null, cljs.core.deref.call(null, a), (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "update-lis", "lt.objs.sidebar.command/update-lis", 1390862956), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__update_lis, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.sidebar.command.input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.search", "input.search", 1599745982), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013)), new cljs.core.Keyword(null, 
  "tabindex", "tabindex", 4410954191), "0"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  }, new cljs.core.Keyword(null, "keyup", "keyup", 1115849900), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "change!", "change!", 1752847843), lt.util.dom.val.call(null, this));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.command.__GT_items = function(a) {
  return(a ? a.cljs$lang$protocol_mask$partition0$ & 32768 || a.cljs$core$IDeref$ || (a.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, a)) ? cljs.core.deref.call(null, a) : cljs.core.fn_QMARK_.call(null, a) ? a.call(null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? a : null;
};
lt.objs.sidebar.command.score_sort = function(a, b) {
  return b[3] - a[3];
};
lt.objs.sidebar.command.score_sort2 = function(a, b) {
  return b[4].score - a[4].score;
};
lt.objs.sidebar.command.indexed_results = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  var b = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "key", "key", 1014010321)), c = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "items", "items", 1114430258));
  cljs.core.get.call(null, a, new cljs.core.Keyword(null, "size", "size", 1017434995));
  var d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "search", "search", 4402534682));
  a = cljs.core.apply.call(null, cljs.core.array, lt.objs.sidebar.command.__GT_items.call(null, c));
  var c = function(a) {
    return function(a) {
      return[a, b.call(null, a), fastScore(b.call(null, a), d), null, null];
    };
  }(a), e = function(a, b) {
    return function(a) {
      a[3] = a[1].score(d);
      return a;
    };
  }(a, c), f = function(a, b, c) {
    return function(a) {
      a[4] = score(a[1], d);
      return a;
    };
  }(a, c, e), g = function(a, b, c, d) {
    return function(a) {
      return 0 < a[4].score;
    };
  }(a, c, e, f);
  return cljs.core.empty_QMARK_.call(null, d) ? a.map(function(a) {
    return[a, b.call(null, a), null, null];
  }) : a.map(c).filter(function(a) {
    return a[2];
  }).map(e).sort(lt.objs.sidebar.command.score_sort).slice(0, 50).map(f).filter(g).sort(lt.objs.sidebar.command.score_sort2);
};
lt.objs.sidebar.command.current_selected = function(a) {
  var b = lt.objs.sidebar.command.indexed_results.call(null, cljs.core.deref.call(null, a)), c = cljs.core.count.call(null, b), d = (new cljs.core.Keyword(null, "selected", "selected", 2205476365)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  a = cljs.core.mod.call(null, d, c > (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) ? (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) : c);
  return 0 < c ? b[a][0] : null;
};
lt.objs.sidebar.command.item = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "index", "index", 1114250308), b], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "mousedown", "mousedown", 1600748089), 
  function(c) {
    lt.util.dom.prevent.call(null, c);
    lt.util.dom.stop_propagation.call(null, c);
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set-selection!", "set-selection!", 4610208210), b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select!", "select!", 2992004631), b);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "filter-list", "lt.objs.sidebar.command/filter-list", 686625835), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309), null], null), null), new cljs.core.Keyword(null, "selected", "selected", 2205476365), 0, new cljs.core.Keyword(null, "placeholder", "placeholder", 
1612151013), "search", new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "search", "search", 4402534682), "", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  var c = cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "size", "size", 1017434995), 100], null), b), d = function() {
    return function(b) {
      return function g(c) {
        return new cljs.core.LazySeq(null, function(b) {
          return function() {
            for (;;) {
              var b = cljs.core.seq.call(null, c);
              if (b) {
                if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
                  var d = cljs.core.chunk_first.call(null, b), e = cljs.core.count.call(null, d), k = cljs.core.chunk_buffer.call(null, e);
                  a: {
                    for (var q = 0;;) {
                      if (q < e) {
                        var r = cljs.core._nth.call(null, d, q);
                        cljs.core.chunk_append.call(null, k, lt.objs.sidebar.command.item.call(null, a, r));
                        q += 1;
                      } else {
                        d = !0;
                        break a;
                      }
                    }
                    d = void 0;
                  }
                  return d ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), g.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), null);
                }
                k = cljs.core.first.call(null, b);
                return cljs.core.cons.call(null, lt.objs.sidebar.command.item.call(null, a, k), g.call(null, cljs.core.rest.call(null, b)));
              }
              return null;
            }
          };
        }(b), null, null);
      };
    }(c).call(null, cljs.core.range.call(null, (new cljs.core.Keyword(null, "size", "size", 1017434995)).cljs$core$IFn$_invoke$arity$1(c)));
  }();
  lt.object.merge_BANG_.call(null, a, cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lis", "lis", 1014011400), cljs.core.vec.call(null, d)], null), c));
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.filter-list.empty", "div.filter-list.empty", 3131797703), lt.objs.sidebar.command.input.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), d], null)], null);
});
lt.objs.sidebar.command.filter_list = function(a) {
  a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "filter-list", "lt.objs.sidebar.command/filter-list", 686625835), a);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  return a;
};
lt.objs.sidebar.command.__BEH__select_command = function(a, b) {
  var c = lt.objs.command.by_id.call(null, b);
  if (cljs.core.truth_(c)) {
    if (cljs.core.truth_((new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(c))) {
      return lt.object.merge_BANG_.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), c], null)), lt.object.raise.call(null, (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
    }
    lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "exec!", "exec!", 1110854946), c);
    lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "selected-exec", "selected-exec", 2423866357), c);
    return lt.object.merge_BANG_.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "select-command", "lt.objs.sidebar.command/select-command", 4575873636), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__select_command, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.objs.sidebar.command.__BEH__select_hidden = function(a, b) {
  var c = lt.objs.command.by_id.call(null, cljs.core.keyword.call(null, b));
  return cljs.core.truth_(c) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select", "select", 4402849902), c) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "select-hidden", "lt.objs.sidebar.command/select-hidden", 878710275), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__select_hidden, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select-unknown", "select-unknown", 2733767659), null], null), 
null));
lt.objs.sidebar.command.__BEH__post_select_pop = function(a) {
  return cljs.core._EQ_.call(null, a, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.sidebar.rightbar))) ? lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "close!", "close!", 3951350939), cljs.core.not.call(null, function() {
    var a = lt.objs.context.in_QMARK_.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401));
    return cljs.core.truth_(a) ? a : lt.objs.context.in_QMARK_.call(null, new cljs.core.Keyword(null, "options-input", "options-input", 2975266637));
  }())) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "post-select-pop", "lt.objs.sidebar.command/post-select-pop", 4406886573), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__post_select_pop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected-exec", "selected-exec", 2423866357), null], 
null), null));
lt.objs.sidebar.command.__BEH__exec_command = function() {
  var a = function(a, b, e) {
    var f = lt.objs.command.by_id.call(null, b);
    return cljs.core.not.call(null, (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(f)) ? cljs.core.apply.call(null, lt.objs.command.exec_BANG_, f, e) : cljs.core.truth_(function() {
      var a = (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(f);
      return cljs.core.truth_(a) ? cljs.core.seq.call(null, e) : a;
    }()) ? cljs.core.apply.call(null, (new cljs.core.Keyword(null, "exec", "exec", 1017031683)).cljs$core$IFn$_invoke$arity$1(f), e) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "show-commandbar-transient", "show-commandbar-transient", 3110127655)), lt.object.raise.call(null, (new cljs.core.Keyword(null, "selector", "selector", 2205476689)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, 
    "select", "select", 4402849902), f)) : null;
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "exec-command", "lt.objs.sidebar.command/exec-command", 1772645359), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__exec_command, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "exec!", "exec!", 1110854946), null], null), null));
lt.objs.sidebar.command.__BEH__exec_active_BANG_ = function(a, b) {
  var c = (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.apply.call(null, (new cljs.core.Keyword(null, "exec", "exec", 1017031683)).cljs$core$IFn$_invoke$arity$1(c), b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selected-exec", "selected-exec", 2423866357), c);
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "exec-active!", "lt.objs.sidebar.command/exec-active!", 3886149887), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__exec_active_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "exec-active!", "exec-active!", 3313422353), null], null), 
null));
lt.objs.sidebar.command.__BEH__focus_on_show = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "focus-on-show", "lt.objs.sidebar.command/focus-on-show", 2355413928), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__focus_on_show, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.sidebar.command.__BEH__focus_BANG_ = function(a) {
  return cljs.core.not.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? (a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a)), lt.util.dom.focus.call(null, a), a.select()) : lt.object.raise.call(null, (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "active", "active", 
  3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "focus!", "lt.objs.sidebar.command/focus!", 4782843825), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.sidebar.command.__BEH__soft_focus_BANG_ = function(a) {
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a));
  return lt.util.dom.focus.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "soft-focus!", "lt.objs.sidebar.command/soft-focus!", 1534012590), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__soft_focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "soft-focus!", "soft-focus!", 824282302), null], null), null));
lt.objs.sidebar.command.__BEH__refresh_BANG_ = function(a) {
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "selector", "selector", 2205476689)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "refresh!", "lt.objs.sidebar.command/refresh!", 978443544), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__refresh_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.sidebar.command.__BEH__cancel_BANG_ = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "cancel!", "lt.objs.sidebar.command/cancel!", 2137375959), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__cancel_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cancel!", "cancel!", 1564120153), null], null), null));
lt.objs.sidebar.command.header_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), crate.binding.bound.call(null, a, function(a) {
    return(new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(a));
  })], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "cancel!", "cancel!", 1564120153));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.command.__GT_options = function(a, b) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(b)) ? lt.object.__GT_content.call(null, (new cljs.core.Keyword(null, "options", "options", 4059396624)).cljs$core$IFn$_invoke$arity$1(b)) : null;
};
lt.objs.sidebar.command.__GT_command_class = function(a) {
  return[cljs.core.str("command "), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(a)) ? "options" : "selector"), cljs.core.str(cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.Keyword(null, "active", "active", 3885920888))) ? " active" : null)].join("");
};
lt.objs.sidebar.command.__GT_binding = function(a) {
  var b = cljs.core.nth.call(null, a, 0, null);
  a = cljs.core.nth.call(null, a, 1, null);
  return[cljs.core.str(a), cljs.core.str(-1 < ("" + cljs.core.str(b)).indexOf("emacs") ? " (Emacs)" : null), cljs.core.str(-1 < ("" + cljs.core.str(b)).indexOf("vim") ? " (Vim)" : null)].join("");
};
lt.objs.sidebar.command.command__GT_display = function(a, b, c, d) {
  return[cljs.core.str("\x3cp\x3e"), cljs.core.str(c), cljs.core.str("\x3cp\x3e"), cljs.core.str(function() {
    var a = cljs.core.seq.call(null, lt.objs.keyboard.cmd__GT_bindings.call(null, d.call(null, new cljs.core.Keyword(null, "command", "command", 1964298941))));
    return a ? [cljs.core.str("\x3cp class\x3d'binding'\x3e"), cljs.core.str(clojure.string.join.call(null, " | ", cljs.core.map.call(null, lt.objs.sidebar.command.__GT_binding, cljs.core.reverse.call(null, a)))), cljs.core.str("\x3c/p\x3e")].join("") : null;
  }())].join("");
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "sidebar.command", "lt.objs.sidebar.command/sidebar.command", 4586401569), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar.command", "sidebar.command", 3945910827), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "command", new cljs.core.Keyword(null, "active", 
"active", 3885920888), null, new cljs.core.Keyword(null, "order", "order", 1119910592), 3, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  var b = crate.binding.subatom.call(null, lt.objs.command.manager, new cljs.core.Keyword(null, "commands", "commands", 4706336250)), c = crate.binding.computed.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), function(a) {
    return function(b) {
      return cljs.core.filter.call(null, function(a) {
        return function(a) {
          return cljs.core.not.call(null, (new cljs.core.Keyword(null, "hidden", "hidden", 4091384092)).cljs$core$IFn$_invoke$arity$1(a));
        };
      }(a), cljs.core.vals.call(null, b));
    };
  }(b)), b = lt.objs.sidebar.command.filter_list.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "items", "items", 1114430258), c, new cljs.core.Keyword(null, "transform", "transform", 2066570974), function(a, b) {
    return function(a, b, c, d) {
      return lt.objs.sidebar.command.command__GT_display.call(null, a, b, c, d);
    };
  }(b, c), new cljs.core.Keyword(null, "key", "key", 1014010321), new cljs.core.Keyword(null, "desc", "desc", 1016984067)], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selector", "selector", 2205476689), b], null));
  lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "command.selector", "command.selector", 1674182292)], null));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.sidebar.command.__GT_command_class)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.selector", "div.selector", 3570198542), lt.object.__GT_content.call(null, 
  b)], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.options", "div.options", 1332473267), lt.objs.sidebar.command.header_button.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888)), function(b) {
    return lt.objs.sidebar.command.__GT_options.call(null, a, b);
  })], null)], null)], null);
});
lt.objs.sidebar.command.__BEH__init_commands = function(a) {
  return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "init-commands", "lt.objs.sidebar.command/init-commands", 802745109), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.command.__BEH__init_commands, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "post-init", "post-init", 2970371471), null], null), null));
lt.objs.sidebar.command.sidebar_command = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.command", "sidebar.command", "lt.objs.sidebar.command/sidebar.command", 4586401569));
lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "commandbar", "commandbar", 1798064218), lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.rightbar, lt.objs.sidebar.command.sidebar_command);
lt.objs.sidebar.command.command = lt.objs.command.command;
lt.objs.sidebar.command.show_and_focus = function(a) {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.command.sidebar_command, a);
};
lt.objs.sidebar.command.pre_fill = function(a) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, lt.objs.sidebar.command.sidebar_command)), a);
};
lt.objs.sidebar.command.show_filled = function(a, b) {
  lt.objs.sidebar.command.pre_fill.call(null, a);
  lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.command.sidebar_command, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "soft?", "soft?", 1123517639), !0));
  return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "soft-focus!", "soft-focus!", 824282302));
};
lt.objs.sidebar.command.exec_BANG_ = lt.objs.command.exec_BANG_;
lt.objs.sidebar.command.exec_active_BANG_ = function() {
  var a = function(a) {
    return lt.object.raise.call(null, lt.objs.sidebar.command.sidebar_command, new cljs.core.Keyword(null, "exec-active!", "exec-active!", 3313422353), a);
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "show-commandbar", "show-commandbar", 3043887402), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Command: Show command bar", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.show_and_focus.call(null, cljs.core.PersistentArrayMap.EMPTY);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "show-commandbar-transient", "show-commandbar-transient", 3110127655), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Command: Show command bar transiently", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.show_and_focus.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "transient?", "transient?", 3584270951), !0], null));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "quit", "quit", 1017386433), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Window: Quit Light Table", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.app.close.call(null);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "passthrough", "passthrough", 3850081542), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "No-op key passthrough", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.keyboard.passthrough.call(null);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "filter-list.input.move-selection", "filter-list.input.move-selection", 2715992545), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "FilterList: move selection", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401)), new cljs.core.Keyword(null, "move-selection", "move-selection", 2808852994), a);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "filter-list.input.select!", "filter-list.input.select!", 2873744152), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "FilterList: select", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401)), new cljs.core.Keyword(null, "select!", "select!", 2992004631));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "filter-list.input.escape!", "filter-list.input.escape!", 3725983795), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "FilterList: escape", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401)), new cljs.core.Keyword(null, "escape!", "escape!", 3844244274), a);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "options-input.select!", "options-input.select!", 4522272516), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "OptionsInput: select", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "options-input", "options-input", 2975266637)), new cljs.core.Keyword(null, "select!", "select!", 2992004631));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "options-input.escape!", "options-input.escape!", 1079544863), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "OptionsInput: escape", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "options-input", "options-input", 2975266637)), new cljs.core.Keyword(null, "escape!", "escape!", 3844244274));
}], null));
lt.objs.popup = {};
lt.objs.popup._STAR_no_close_STAR_ = null;
lt.objs.popup.__BEH__on_click_destroy = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "on-click-destroy", "lt.objs.popup/on-click-destroy", 4693561385), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.popup.__BEH__on_click_destroy, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "click", "click", 1108654330), null], null), null));
lt.objs.popup.__BEH__close_BANG_ = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close", "close", 1108660586));
  lt.object.destroy_BANG_.call(null, a);
  return(a = cljs.core.seq.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766)))) ? lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766), cljs.core.last.call(null, a)) : lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "close!", "lt.objs.popup/close!", 4613970955), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.popup.__BEH__close_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], null), null));
lt.objs.popup.__BEH__refocus_on_close = function(a) {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "tabs.focus-active", "tabs.focus-active", 2001074557));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "refocus-on-close", "lt.objs.popup/refocus-on-close", 2521298612), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.popup.__BEH__refocus_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.popup.__BEH__change_active_button = function(a, b) {
  var c = lt.util.dom.$$.call(null, ".button", lt.object.__GT_content.call(null, a)), d = cljs.core.mod.call(null, (new cljs.core.Keyword(null, "button", "button", 3931183780)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) + b, cljs.core.count.call(null, c));
  lt.util.dom.remove_class.call(null, c[(new cljs.core.Keyword(null, "button", "button", 3931183780)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], new cljs.core.Keyword(null, "active", "active", 3885920888));
  lt.util.dom.add_class.call(null, c[d], new cljs.core.Keyword(null, "active", "active", 3885920888));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "button", "button", 3931183780), d], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "change-active-button", "lt.objs.popup/change-active-button", 2736197342), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.popup.__BEH__change_active_button, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move-active", "move-active", 3635471348), null], null), null));
lt.objs.popup.__BEH__exec_active = function(a) {
  var b = lt.util.dom.$$.call(null, ".button", lt.object.__GT_content.call(null, a));
  return lt.util.dom.trigger.call(null, b[(new cljs.core.Keyword(null, "button", "button", 3931183780)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], new cljs.core.Keyword(null, "click", "click", 1108654330));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "exec-active", "lt.objs.popup/exec-active", 1054217124), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.popup.__BEH__exec_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "exec-active", "exec-active", 533892916), null], null), null));
lt.objs.popup.remain_open = function() {
  return lt.objs.popup._STAR_no_close_STAR_ = !0;
};
lt.objs.popup.__GT_button = function(a, b) {
  for (var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "post-action", "post-action", 4039331701)), e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "action", "action", 3885920680)), c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "label", "label", 1116631654)), c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "li.button", "li.button", 2481585205), c], null)), f = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    var b = lt.objs.popup._STAR_no_close_STAR_;
    try {
      return lt.objs.popup._STAR_no_close_STAR_ = null, cljs.core.fn_QMARK_.call(null, e) && e.call(null), cljs.core.truth_(lt.objs.popup._STAR_no_close_STAR_) || lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939)), cljs.core.fn_QMARK_.call(null, d) ? d.call(null) : null;
    } finally {
      lt.objs.popup._STAR_no_close_STAR_ = b;
    }
  }], null))), g = null, h = 0, k = 0;;) {
    if (k < h) {
      var l = cljs.core._nth.call(null, g, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null);
      lt.util.dom.on.call(null, c, m, l);
      k += 1;
    } else {
      if (f = cljs.core.seq.call(null, f)) {
        cljs.core.chunked_seq_QMARK_.call(null, f) ? (h = cljs.core.chunk_first.call(null, f), f = cljs.core.chunk_rest.call(null, f), g = h, h = cljs.core.count.call(null, h)) : (h = cljs.core.first.call(null, f), g = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), lt.util.dom.on.call(null, c, g, h), f = cljs.core.next.call(null, f), g = null, h = 0), k = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.popup.popup_content = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "header", "header", 
  4087600639)).cljs$core$IFn$_invoke$arity$1(b)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), (new cljs.core.Keyword(null, "body", "body", 1016933652)).cljs$core$IFn$_invoke$arity$1(b)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.buttons", "ul.buttons", 666323612), function() {
    return function m(b) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var c = cljs.core.seq.call(null, b);
          if (c) {
            if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
              var d = cljs.core.chunk_first.call(null, c), e = cljs.core.count.call(null, d), f = cljs.core.chunk_buffer.call(null, e);
              a: {
                for (var g = 0;;) {
                  if (g < e) {
                    var h = cljs.core._nth.call(null, d, g);
                    cljs.core.chunk_append.call(null, f, lt.objs.popup.__GT_button.call(null, a, h));
                    g += 1;
                  } else {
                    d = !0;
                    break a;
                  }
                }
                d = void 0;
              }
              return d ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), m.call(null, cljs.core.chunk_rest.call(null, c))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), null);
            }
            f = cljs.core.first.call(null, c);
            return cljs.core.cons.call(null, lt.objs.popup.__GT_button.call(null, a, f), m.call(null, cljs.core.rest.call(null, c)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.reverse.call(null, (new cljs.core.Keyword(null, "buttons", "buttons", 1255256819)).cljs$core$IFn$_invoke$arity$1(b)));
  }()], null)], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    lt.util.dom.prevent.call(null, a);
    return lt.util.dom.stop_propagation.call(null, a);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.popup.popup = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.popup", "div.popup", 2038588545), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tabindex", "tabindex", 4410954191), -1], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), lt.objs.popup.popup_content.call(null, a, b)], null)], 
  null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.popup", "popup", "lt.objs.popup/popup", 767372430), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "popup", "popup", 1120756766), null], null), null), new cljs.core.Keyword(null, "button", "button", 3931183780), 0, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  return lt.objs.popup.popup.call(null, a, b);
});
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "popup.exec-active", "popup.exec-active", 2113737970), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Popup: execute active option", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "exec-active", "exec-active", 533892916)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "popup.move-active", "popup.move-active", 920349106), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Popup: move selection", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766));
  return cljs.core.truth_(b) ? lt.object.raise.call(null, b, new cljs.core.Keyword(null, "move-active", "move-active", 3635471348), a) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "popup.escape", "popup.escape", 1937231733), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Popup: escape", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330)) : null;
}], null));
lt.objs.popup.popup_BANG_ = function(a) {
  a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.popup", "popup", "lt.objs.popup/popup", 767372430), a);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move-active", "move-active", 3635471348), 0);
  lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), lt.object.__GT_content.call(null, a));
  lt.object.__GT_content.call(null, a).focus();
  lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "popup", "popup", 1120756766), a);
  return a;
};
lt.objs.popup.cancel_button = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "cancel", new cljs.core.Keyword(null, "action", "action", 3885920680), new cljs.core.Keyword(null, "cancel", "cancel", 3941147116)], null);
lt.objs.bottombar = {};
lt.objs.bottombar.min_height = 30;
lt.objs.bottombar.default_height = 130;
lt.objs.bottombar.horizontal_grip = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.horizontal-grip", "div.horizontal-grip", 642788208), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "draggable", "draggable", 709423359), "true"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "dragstart", "dragstart", 721070880), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649));
  }, new cljs.core.Keyword(null, "dragend", "dragend", 2926432921), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352));
  }, new cljs.core.Keyword(null, "drag", "drag", 1016996006), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "height!", "height!", 1816692556), b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.bottombar.active_content = function(a) {
  return cljs.core.truth_(a) ? lt.object.__GT_content.call(null, a) : null;
};
lt.objs.bottombar.active_QMARK_ = function(a) {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.bottombar.bottombar)), a);
};
lt.objs.bottombar.__GT_active_class = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  return cljs.core.truth_(a) ? "open" : "closed";
};
lt.objs.bottombar.add_item = function(a) {
  return lt.object.update_BANG_.call(null, lt.objs.bottombar.bottombar, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "items", "items", 1114430258)], null), cljs.core.assoc, (new cljs.core.Keyword(null, "order", "order", 1119910592)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), a);
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "bottombar", "lt.objs.bottombar/bottombar", 1537782029), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "bottombar", "bottombar", 3453493626), null], null), null), new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.sorted_map_by.call(null, cljs.core._GT_), new cljs.core.Keyword(null, "height", 
"height", 4087841945), 0, new cljs.core.Keyword(null, "max-height", "max-height", 585117986), lt.objs.bottombar.default_height, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#bottombar", "div#bottombar", 676879368), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.bottombar.__GT_active_class), new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "left", "left", 1017222009), crate.binding.bound.call(null, 
  crate.binding.subatom.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "left", "left", 1017222009)), lt.util.style.__GT_px), new cljs.core.Keyword(null, "right", "right", 1122416014), crate.binding.bound.call(null, crate.binding.subatom.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "right", "right", 1122416014)), lt.util.style.__GT_px), new cljs.core.Keyword(null, "height", "height", 4087841945), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, 
  "height", "height", 4087841945)), lt.util.style.__GT_px)], null)], null), lt.objs.bottombar.horizontal_grip.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.content", "div.content", 3533478798), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888)), lt.objs.bottombar.active_content)], null)], null);
});
lt.objs.bottombar.bottombar = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.bottombar", "bottombar", "lt.objs.bottombar/bottombar", 1537782029));
lt.objs.canvas.add_BANG_.call(null, lt.objs.bottombar.bottombar);
lt.objs.bottombar.__BEH__no_anim_on_drag = function(a) {
  return lt.objs.animations.off.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "no-anim-on-drag", "lt.objs.bottombar/no-anim-on-drag", 685212711), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__no_anim_on_drag, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "start-drag", "start-drag", 3689081649), null], null), null));
lt.objs.bottombar.__BEH__reanim_on_drop = function(a) {
  return lt.objs.animations.on.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "reanim-on-drop", "lt.objs.bottombar/reanim-on-drop", 2397266689), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__reanim_on_drop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "end-drag", "end-drag", 2692811352), null], null), null));
lt.objs.bottombar.__BEH__height_BANG_ = function(a, b) {
  if (cljs.core._EQ_.call(null, 0, b.clientY)) {
    return null;
  }
  var c;
  c = window.innerHeight - b.clientY;
  var d = lt.objs.bottombar.min_height;
  c = c > d ? c : d;
  lt.object.raise.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "bottom!", "bottom!", 1083481800), c - (new cljs.core.Keyword(null, "height", "height", 4087841945)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "height", "height", 4087841945), c, new cljs.core.Keyword(null, "max-height", "max-height", 585117986), c], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "height!", "lt.objs.bottombar/height!", 3122217663), new cljs.core.Keyword(null, "throttle", "throttle", 2497347228), 16, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__height_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "height!", "height!", 
1816692556), null], null), null));
lt.objs.bottombar.__BEH__show_item = function(a, b) {
  return cljs.core.not_EQ_.call(null, b, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? (lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "active", "active", 3885920888), b, new cljs.core.Keyword(null, "height", "height", 4087841945), (new cljs.core.Keyword(null, "max-height", "max-height", 585117986)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], 
  null)), lt.object.raise.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "bottom!", "bottom!", 1083481800), (new cljs.core.Keyword(null, "max-height", "max-height", 585117986)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "show-item", "lt.objs.bottombar/show-item", 1162331896), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__show_item, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show!", "show!", 1123317814), null], null), null));
lt.objs.bottombar.__BEH__hide_item = function(a, b, c) {
  return cljs.core.truth_(function() {
    var d = cljs.core._EQ_.call(null, b, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    return d ? d : c;
  }()) ? (lt.object.raise.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "bottom!", "bottom!", 1083481800), -(new cljs.core.Keyword(null, "max-height", "max-height", 585117986)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "active", "active", 3885920888), null, new cljs.core.Keyword(null, "height", "height", 4087841945), 0], null))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "hide-item", "lt.objs.bottombar/hide-item", 3118213019), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__hide_item, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), null], null), null));
lt.objs.bottombar.__BEH__item_toggled = function(a, b, c) {
  return cljs.core.truth_(function() {
    var d = cljs.core.not_EQ_.call(null, b, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    return d ? d : c;
  }()) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "show!", "show!", 1123317814), b) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.bottombar", "item-toggled", "lt.objs.bottombar/item-toggled", 2840037827), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.bottombar.__BEH__item_toggled, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), null], null), null));
lt.objs.statusbar = {};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar-container", "lt.objs.statusbar/statusbar-container", 2425546359), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "statusbar", "statusbar", 3238675027), null], null), null), new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.sorted_set_by.call(null, function(a) {
  return(new cljs.core.Keyword(null, "order", "order", 1119910592)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
}), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#statusbar-container", "div#statusbar-container", 4312198421)], null);
});
lt.objs.statusbar.container = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar-container", "lt.objs.statusbar/statusbar-container", 2425546359));
lt.objs.statusbar.add_container = function(a) {
  lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "statusbar-item", "statusbar-item", 4250035697)], null));
  lt.object.update_BANG_.call(null, lt.objs.statusbar.container, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "items", "items", 1114430258)], null), cljs.core.conj, a);
  var b = lt.util.cljs.index_of.call(null, a, (new cljs.core.Keyword(null, "items", "items", 1114430258)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.statusbar.container)));
  return cljs.core._EQ_.call(null, b, 0) ? lt.util.dom.prepend.call(null, lt.object.__GT_content.call(null, lt.objs.statusbar.container), lt.object.__GT_content.call(null, a)) : lt.util.dom.after.call(null, lt.object.__GT_content.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "items", "items", 1114430258)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.statusbar.container)), b)), lt.object.__GT_content.call(null, a));
};
lt.objs.statusbar.__BEH__on_show_BANG_ = function(a) {
  if (cljs.core.truth_((new cljs.core.Keyword("lt.objs.statusbar", "shown", "lt.objs.statusbar/shown", 1816687083)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
    return null;
  }
  lt.util.dom.css.call(null, lt.object.__GT_content.call(null, a), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "height", "height", 4087841945), (new cljs.core.Keyword(null, "height", "height", 4087841945)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar", "shown", "lt.objs.statusbar/shown", 1816687083), !0], null));
  return lt.object.raise.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "tabset-bottom!", "tabset-bottom!", 2684870056), (new cljs.core.Keyword(null, "height", "height", 4087841945)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "on-show!", "lt.objs.statusbar/on-show!", 2528540082), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__on_show_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show!", "show!", 1123317814), null], null), null));
lt.objs.statusbar.__BEH__on_hide_BANG_ = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword("lt.objs.statusbar", "shown", "lt.objs.statusbar/shown", 1816687083)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? (lt.util.dom.css.call(null, lt.object.__GT_content.call(null, a), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "height", "height", 4087841945), 0], null)), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar", "shown", "lt.objs.statusbar/shown", 
  1816687083), !1], null)), lt.object.raise.call(null, lt.objs.tabs.multi, new cljs.core.Keyword(null, "tabset-bottom!", "tabset-bottom!", 2684870056), -(new cljs.core.Keyword(null, "height", "height", 4087841945)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "on-hide!", "lt.objs.statusbar/on-hide!", 2534061899), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__on_hide_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), null], null), null));
lt.objs.statusbar.__BEH__init_statusbar = function(a) {
  return lt.util.dom.append.call(null, lt.object.__GT_content.call(null, lt.objs.tabs.multi), lt.object.__GT_content.call(null, lt.objs.statusbar.container));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "init-statusbar", "lt.objs.statusbar/init-statusbar", 3154736296), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__init_statusbar, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.statusbar.statusbar_item = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), b], null), a], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar", "lt.objs.statusbar/statusbar", 3933351963), new cljs.core.Keyword(null, "items", "items", 1114430258), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "height", "height", 4087841945), 34, new cljs.core.Keyword(null, "order", "order", 1119910592), 0, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul#statusbar", "ul#statusbar", 2076227431), crate.binding.map_bound.call(null, function(a) {
    return lt.object.__GT_content.call(null, cljs.core.deref.call(null, a));
  }, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "path", "path", 1017337751), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "items", "items", 1114430258)], null)], null))], null);
});
lt.objs.statusbar.statusbar = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar", "lt.objs.statusbar/statusbar", 3933351963));
lt.objs.statusbar.add_container.call(null, lt.objs.statusbar.statusbar);
lt.objs.statusbar.__BEH__show_statusbar = function(a) {
  return lt.object.raise.call(null, lt.objs.statusbar.statusbar, new cljs.core.Keyword(null, "show!", "show!", 1123317814));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "show-statusbar", "lt.objs.statusbar/show-statusbar", 3545826539), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__show_statusbar, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Show statusbar at the bottom of the editor", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.statusbar.add_statusbar_item = function(a) {
  return lt.object.update_BANG_.call(null, lt.objs.statusbar.statusbar, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "items", "items", 1114430258)], null), cljs.core.conj, a);
};
lt.objs.statusbar.__GT_cursor_str = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "pos", "pos", 1014015430));
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.pos", "span.pos", 3069890850), [cljs.core.str(""), cljs.core.str((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(a) + 1), cljs.core.str(" / "), cljs.core.str((new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(a) + 1)].join("")], null);
};
lt.objs.statusbar.__BEH__update_cursor_location = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pos", "pos", 1014015430), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "update-cursor-location", "lt.objs.statusbar/update-cursor-location", 3219638212), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__update_cursor_location, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "update!", "update!", 779473898), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.cursor", "lt.objs.statusbar/statusbar.cursor", 2923420677), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.statusbar", "update-cursor-location", "lt.objs.statusbar/update-cursor-location", 
3219638212), null], null), null), new cljs.core.Keyword(null, "pos", "pos", 1014015430), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), 0, new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0], null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.statusbar.statusbar_item.call(null, crate.binding.bound.call(null, a, lt.objs.statusbar.__GT_cursor_str), "");
});
lt.objs.statusbar.statusbar_cursor = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.cursor", "lt.objs.statusbar/statusbar.cursor", 2923420677));
lt.objs.statusbar.add_statusbar_item.call(null, lt.objs.statusbar.statusbar_cursor);
lt.objs.statusbar.__BEH__report_cursor_location = function(a) {
  return lt.object.raise.call(null, lt.objs.statusbar.statusbar_cursor, new cljs.core.Keyword(null, "update!", "update!", 779473898), lt.objs.editor.__GT_cursor.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "report-cursor-location", "lt.objs.statusbar/report-cursor-location", 4636515157), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.statusbar.__BEH__report_cursor_location, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "move", "move", 1017261891), null, new cljs.core.Keyword(null, 
"active", "active", 3885920888), null], null), null));
lt.objs.statusbar.loader_disp = function(a) {
  return 0 < (new cljs.core.Keyword(null, "loaders", "loaders", 1350551090)).cljs$core$IFn$_invoke$arity$1(a) ? "" : "none";
};
lt.objs.statusbar.arrow_disp = function(a) {
  return 0 < (new cljs.core.Keyword(null, "loaders", "loaders", 1350551090)).cljs$core$IFn$_invoke$arity$1(a) ? "none" : "";
};
lt.objs.statusbar.loader = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.load-wrapper", "span.load-wrapper", 4427265602), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "display", "display", 2685668404), crate.binding.bound.call(null, a, lt.objs.statusbar.loader_disp)], null)], null), new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.img", "span.img", 3069884049)], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.statusbar.log_item = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, "text", "text", 1017460895))], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.statusbar.__GT_message_class = function(a) {
  return[cljs.core.str("message "), cljs.core.str(cljs.core.truth_(a) ? a : "")].join("");
};
lt.objs.statusbar.log = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.log", "div.log", 2686473177), lt.objs.statusbar.loader.call(null, a), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
    return lt.objs.statusbar.__GT_message_class.call(null, (new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(a));
  })], null), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, "message", "message", 1968829305))], null)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.loader", "lt.objs.statusbar/statusbar.loader", 2772437308), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "statusbar.console", "statusbar.console", 4348364476), null], null), null), new cljs.core.Keyword(null, "loaders", "loaders", 1350551090), 0, new cljs.core.Keyword(null, "message", "message", 
1968829305), "", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.statusbar.statusbar_item.call(null, lt.objs.statusbar.log.call(null, a), "left");
});
lt.objs.statusbar.statusbar_loader = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.loader", "lt.objs.statusbar/statusbar.loader", 2772437308));
lt.objs.statusbar.add_statusbar_item.call(null, lt.objs.statusbar.statusbar_loader);
lt.objs.statusbar.loader_set = function() {
  return lt.object.merge_BANG_.call(null, lt.objs.statusbar.statusbar_loader, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "loaders", "loaders", 1350551090), 0], null));
};
lt.objs.statusbar.loader_inc = function() {
  return lt.object.update_BANG_.call(null, lt.objs.statusbar.statusbar_loader, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "loaders", "loaders", 1350551090)], null), cljs.core.inc);
};
lt.objs.statusbar.loader_dec = function() {
  return 0 < (new cljs.core.Keyword(null, "loaders", "loaders", 1350551090)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.statusbar.statusbar_loader)) ? lt.object.update_BANG_.call(null, lt.objs.statusbar.statusbar_loader, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "loaders", "loaders", 1350551090)], null), cljs.core.dec) : null;
};
lt.objs.statusbar.toggle_class = function(a) {
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "class", "class", 1108647146));
  b = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "dirty", "dirty", 1109497668));
  return[cljs.core.str("console-toggle "), cljs.core.str(cljs.core.truth_(a) ? [cljs.core.str(a), cljs.core.str(" ")].join("") : null), cljs.core.str(0 < b ? "dirty" : null)].join("");
};
lt.objs.statusbar.toggle_span = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.statusbar.toggle_class)], null), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, "dirty", "dirty", 1109497668))], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "toggle-console", "toggle-console", 4454540112));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.console-toggle", "lt.objs.statusbar/statusbar.console-toggle", 4344040401), new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), 0, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "statusbar.console-toggle", "statusbar.console-toggle", 3902398121)], null), new cljs.core.Keyword(null, "init", 
"init", 1017141378), function(a) {
  return lt.objs.statusbar.statusbar_item.call(null, lt.objs.statusbar.toggle_span.call(null, a), "");
});
lt.objs.statusbar.console_toggle = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.statusbar", "statusbar.console-toggle", "lt.objs.statusbar/statusbar.console-toggle", 4344040401));
lt.objs.statusbar.add_statusbar_item.call(null, lt.objs.statusbar.console_toggle);
lt.objs.statusbar.dirty = function() {
  return lt.object.update_BANG_.call(null, lt.objs.statusbar.console_toggle, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)], null), cljs.core.inc);
};
lt.objs.statusbar.clean = function() {
  return lt.object.merge_BANG_.call(null, lt.objs.statusbar.console_toggle, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), 0, new cljs.core.Keyword(null, "class", "class", 1108647146), null], null));
};
lt.objs.statusbar.console_class = function(a) {
  return lt.object.merge_BANG_.call(null, lt.objs.statusbar.console_toggle, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), a], null));
};
lt.objs.notifos = {};
lt.objs.notifos.standard_timeout = 1E4;
lt.objs.notifos.msg_STAR_ = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = "string" === typeof a ? a : cljs.core.pr_str.call(null, a);
    return lt.object.merge_BANG_.call(null, lt.objs.statusbar.statusbar_loader, cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "message", "message", 1968829305), f, new cljs.core.Keyword(null, "class", "class", 1108647146), ""], null), e));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.notifos.set_msg_BANG_ = function() {
  var a = null, b = function(a) {
    lt.objs.notifos.msg_STAR_.call(null, a);
    clearTimeout(lt.objs.notifos.cur_timeout);
    return lt.objs.notifos.cur_timeout = lt.util.js.wait.call(null, lt.objs.notifos.standard_timeout, function() {
      return lt.objs.notifos.msg_STAR_.call(null, "");
    });
  }, c = function(a, b) {
    lt.objs.notifos.msg_STAR_.call(null, a, b);
    clearTimeout(lt.objs.notifos.cur_timeout);
    return lt.objs.notifos.cur_timeout = lt.util.js.wait.call(null, function() {
      var a = (new cljs.core.Keyword(null, "timeout", "timeout", 3994960083)).cljs$core$IFn$_invoke$arity$1(b);
      return cljs.core.truth_(a) ? a : lt.objs.notifos.standard_timeout;
    }(), function() {
      return lt.objs.notifos.msg_STAR_.call(null, "");
    });
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.notifos.working = function() {
  var a = null, b = function() {
    return a.call(null, null);
  }, c = function(a) {
    cljs.core.truth_(a) && lt.objs.notifos.set_msg_BANG_.call(null, a);
    return lt.objs.statusbar.loader_inc.call(null);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.notifos.done_working = function() {
  var a = null, b = function() {
    return lt.objs.statusbar.loader_dec.call(null);
  }, c = function(a) {
    lt.objs.notifos.set_msg_BANG_.call(null, a);
    return lt.objs.statusbar.loader_dec.call(null);
  }, a = function(a) {
    switch(arguments.length) {
      case 0:
        return b.call(this);
      case 1:
        return c.call(this, a);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$0 = b;
  a.cljs$core$IFn$_invoke$arity$1 = c;
  return a;
}();
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "reset-working", "reset-working", 2350080037), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Status Bar: Reset working indicator", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.statusbar.loader_set.call(null);
}], null));
lt.objs.document = {};
lt.objs.document.doc_keys = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690), new cljs.core.Keyword(null, "mime", "mime", 1017255846)], null);
lt.objs.document.create_STAR_ = function(a) {
  return CodeMirror.Doc((new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(a), (new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(a));
};
lt.objs.document.__GT_cm_doc = function(a) {
  return(new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
};
lt.objs.document.linked_STAR_ = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "type", "type", 1017479852)), e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "shared-history", "shared-history", 2516333214)), f = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "to", "to", 1013907949)), c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "from", "from", 1017056028));
  return lt.objs.document.__GT_cm_doc.call(null, a).linkedDoc(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "from", "from", 1017056028), c, new cljs.core.Keyword(null, "to", "to", 1013907949), f, new cljs.core.Keyword(null, "sharedHist", "sharedHist", 3524212889), e, new cljs.core.Keyword(null, "mode", "mode", 1017261333), d], null)));
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "document", "lt.objs.document/document", 998139243), new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.document", "this", "lt.objs.document/this", 4506312184), null], null), null), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "document", "document", 1875625101), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, cljs.core.merge.call(null, cljs.core.dissoc.call(null, b, new cljs.core.Keyword(null, "content", "content", 1965434859)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "doc", "doc", 1014003882), function() {
    var a = (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(b);
    return cljs.core.truth_(a) ? a : lt.objs.document.create_STAR_.call(null, b);
  }()], null)));
  return null;
});
lt.objs.document.__BEH__close_document_on_editor_close = function(a) {
  a = (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close.force", "close.force", 4409585383)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "close-document-on-editor-close", "lt.objs.document/close-document-on-editor-close", 4752984221), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.document.__BEH__close_document_on_editor_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closed", "closed", 3951351006), 
null], null), null), new cljs.core.Keyword(null, "for", "for", 1014005819), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor", "editor", 4001043679), null], null), null));
lt.objs.document.__BEH__close_linked_document = function(a) {
  var b = (new cljs.core.Keyword(null, "root", "root", 1017410644)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.truth_(b) && (lt.objs.document.__GT_cm_doc.call(null, a).unlinkDoc(lt.objs.document.__GT_cm_doc.call(null, b)), lt.object.update_BANG_.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)], null), cljs.core.disj, a));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "close-linked-document", "lt.objs.document/close-linked-document", 854834124), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.document.__BEH__close_linked_document, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close.force", "close.force", 4409585383), null], null), null), 
new cljs.core.Keyword(null, "for", "for", 1014005819), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "document", "document", 1875625101), null], null), null));
lt.objs.document.__BEH__try_close_root_document = function(a) {
  return cljs.core._EQ_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.document", "this", "lt.objs.document/this", 4506312184), null], null), null), (new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close.force", "close.force", 4409585383)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "try-close-root-document", "lt.objs.document/try-close-root-document", 515293911), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.document.__BEH__try_close_root_document, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "try-close", "try-close", 4311297752), null], null), 
null), new cljs.core.Keyword(null, "for", "for", 1014005819), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "document", "document", 1875625101), null], null), null));
lt.objs.document.__BEH__close_root_document = function(a) {
  return cljs.core._EQ_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.document", "this", "lt.objs.document/this", 4506312184), null], null), null), (new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && cljs.core.not.call(null, lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "document.linked", "document.linked", 3550087614))) ? 
  lt.object.destroy_BANG_.call(null, a) : lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)], null), cljs.core.disj, new cljs.core.Keyword("lt.objs.document", "this", "lt.objs.document/this", 4506312184));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "close-root-document", "lt.objs.document/close-root-document", 4033838565), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.document.__BEH__close_root_document, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close.force", "close.force", 4409585383), null], null), null), 
new cljs.core.Keyword(null, "for", "for", 1014005819), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "document", "document", 1875625101), null], null), null));
lt.objs.document.default_linked_doc_options = cljs.core.PersistentArrayMap.EMPTY;
lt.objs.document.__BEH__set_linked_doc_options = function(a, b) {
  return lt.objs.document.default_linked_doc_options = b;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "set-linked-doc-options", "lt.objs.document/set-linked-doc-options", 4426770422), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.document.__BEH__set_linked_doc_options, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Doc: Set default options for new linked docs", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.document.create = function(a) {
  return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.document", "document", "lt.objs.document/document", 998139243), a);
};
lt.objs.document.create_sub = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c = cljs.core.merge.call(null, lt.objs.document.default_linked_doc_options, b), c = lt.objs.document.create.call(null, cljs.core.merge.call(null, cljs.core.select_keys.call(null, cljs.core.deref.call(null, a), lt.objs.document.doc_keys), c, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "doc", "doc", 1014003882), lt.objs.document.linked_STAR_.call(null, a, c), new cljs.core.Keyword(null, "root", "root", 1017410644), a], null)));
    lt.object.add_tags.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "document.linked", "document.linked", 3550087614)], null));
    return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)], null), cljs.core.conj, c);
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.document.__GT_snapshot = function(a) {
  var b = lt.objs.document.__GT_cm_doc.call(null, a), c = cljs.core.transient$.call(null, cljs.core.PersistentVector.EMPTY);
  b.eachLine(function(a) {
    cljs.core.conj_BANG_.call(null, c, a.text);
    return null;
  });
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "version", "version", 1365512266), b.changeGeneration(), new cljs.core.Keyword(null, "lines", "lines", 1116881521), cljs.core.persistent_BANG_.call(null, c), new cljs.core.Keyword(null, "doc", "doc", 1014003882), a], null);
};
lt.objs.document.latest_snapshot_QMARK_ = function(a) {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a), lt.objs.document.__GT_cm_doc.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a)).changeGeneration());
};
lt.objs.document.__GT_val = function(a) {
  return lt.objs.document.__GT_cm_doc.call(null, a).getValue();
};
lt.objs.document.set_val = function(a, b) {
  return lt.objs.document.__GT_cm_doc.call(null, a).setValue(b);
};
lt.objs.document.replace = function() {
  var a = null, b = function(a, b, c) {
    return lt.objs.document.__GT_cm_doc.call(null, a).replaceRange(c, cljs.core.clj__GT_js.call(null, b));
  }, c = function(a, b, c, g) {
    return lt.objs.document.__GT_cm_doc.call(null, a).replaceRange(g, cljs.core.clj__GT_js.call(null, b), cljs.core.clj__GT_js.call(null, c));
  }, a = function(a, e, f, g) {
    switch(arguments.length) {
      case 3:
        return b.call(this, a, e, f);
      case 4:
        return c.call(this, a, e, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$3 = b;
  a.cljs$core$IFn$_invoke$arity$4 = c;
  return a;
}();
lt.objs.document.register_doc = function(a, b) {
  return lt.object.update_BANG_.call(null, lt.objs.document.manager, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.assoc, b, a);
};
lt.objs.document.open = function(a, b) {
  return lt.objs.files.open.call(null, a, function(c) {
    c = lt.objs.document.create.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "content", "content", 1965434859), (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690), (new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "mtime", "mtime", 1118128172), lt.objs.files.stats.call(null, 
    a), new cljs.core.Keyword(null, "mime", "mime", 1017255846), (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(c)], null));
    lt.objs.document.register_doc.call(null, c, a);
    return cljs.core.truth_(b) ? b.call(null, c) : null;
  });
};
lt.objs.document.linked_open = function(a, b, c, d) {
  lt.objs.document.create_sub.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b);
  return lt.objs.files.open.call(null, c, function(b) {
    b = cljs.core.last.call(null, (new cljs.core.Keyword(null, "sub-docs", "sub-docs", 3182649626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))));
    return cljs.core.truth_(d) ? d.call(null, b) : null;
  });
};
lt.objs.document.check_mtime = function(a, b) {
  return cljs.core.truth_(cljs.core.truth_(a) ? b : a) ? cljs.core._EQ_.call(null, a.mtime.getTime(), b.mtime.getTime()) : !0;
};
lt.objs.document.button = function() {
  var a = function(a, b) {
    for (var e = cljs.core.nth.call(null, b, 0, null), f = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.button.right", "div.button.right", 629503503), a], null)), g = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
      return cljs.core.truth_(e) ? e.call(null) : null;
    }], null))), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), n = cljs.core.nth.call(null, m, 0, null), m = cljs.core.nth.call(null, m, 1, null);
        lt.util.dom.on.call(null, f, n, m);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          cljs.core.chunked_seq_QMARK_.call(null, g) ? (k = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), h = k, k = cljs.core.count.call(null, k)) : (k = cljs.core.first.call(null, g), h = cljs.core.nth.call(null, k, 0, null), k = cljs.core.nth.call(null, k, 1, null), lt.util.dom.on.call(null, f, h, k), g = cljs.core.next.call(null, g), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    return f;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.document.overwrite_warn = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "This file was modified.", new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "It looks like this file was modified outside of Light Table and saving\n                  would overwrite those changes. Do you want to overwrite or cancel?"], 
  null), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Overwrite file", new cljs.core.Keyword(null, "action", "action", 3885920680), a], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Cancel"], null)], null)], null));
};
lt.objs.document.path__GT_doc = function(a) {
  return cljs.core.get.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.document.manager)), a);
};
lt.objs.document.__GT_stats = function(a) {
  return(new cljs.core.Keyword(null, "mtime", "mtime", 1118128172)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.document.path__GT_doc.call(null, a)));
};
lt.objs.document.update_stats = function(a) {
  return lt.object.merge_BANG_.call(null, cljs.core.get_in.call(null, cljs.core.deref.call(null, lt.objs.document.manager), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473), a], null)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mtime", "mtime", 1118128172), lt.objs.files.stats.call(null, a)], null));
};
lt.objs.document.move_doc = function(a, b) {
  var c = lt.objs.document.path__GT_doc.call(null, a);
  return cljs.core.truth_(c) ? (lt.object.update_BANG_.call(null, lt.objs.document.manager, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.assoc, b, c), lt.object.update_BANG_.call(null, lt.objs.document.manager, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.dissoc, a), lt.objs.document.update_stats.call(null, 
  b)) : null;
};
lt.objs.document.save_STAR_ = function(a, b, c) {
  return lt.objs.files.save.call(null, a, b, function(b) {
    lt.objs.document.update_stats.call(null, a);
    return cljs.core.truth_(c) ? c.call(null, b) : null;
  });
};
lt.objs.document.save = function(a, b, c) {
  var d = lt.objs.files.stats.call(null, a);
  return lt.objs.document.check_mtime.call(null, lt.objs.document.__GT_stats.call(null, a), d) ? lt.objs.document.save_STAR_.call(null, a, b, c) : lt.objs.document.overwrite_warn.call(null, function() {
    return lt.objs.document.save_STAR_.call(null, a, b, c);
  });
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.document", "doc-manager", "lt.objs.document/doc-manager", 3973346414), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "init", "init", 1017141378), function() {
  return null;
});
lt.objs.document.manager = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.document", "doc-manager", "lt.objs.document/doc-manager", 3973346414));
lt.objs.editor.pool = {};
lt.objs.editor.pool.get_all = function() {
  return lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679));
};
lt.objs.editor.pool.__BEH__theme_changed = function(a, b) {
  for (var c = cljs.core.seq.call(null, lt.objs.editor.pool.get_all.call(null)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), g = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g));
      lt.objs.editor.set_options.call(null, g, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "theme", "theme", 1124231483), b], null));
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (g = cljs.core.first.call(null, c), d = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g)), lt.objs.editor.set_options.call(null, d, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "theme", "theme", 1124231483), b], null)), c = cljs.core.next.call(null, 
        c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "theme-changed", "lt.objs.editor.pool/theme-changed", 3228173365), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__theme_changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "theme-change", "theme-change", 2937690022), null], null), null));
lt.objs.editor.pool.__BEH__line_numbers_changed = function(a, b) {
  for (var c = cljs.core.seq.call(null, lt.objs.editor.pool.get_all.call(null)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), g = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g));
      lt.objs.editor.set_options.call(null, g, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineNumbers", "lineNumbers", 3695398696), b], null));
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (g = cljs.core.first.call(null, c), d = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g)), lt.objs.editor.set_options.call(null, d, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "lineNumbers", "lineNumbers", 3695398696), b], null)), 
        c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "line-numbers-changed", "lt.objs.editor.pool/line-numbers-changed", 3386463165), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__line_numbers_changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "line-numbers-change", "line-numbers-change", 1971958526), 
null], null), null));
lt.objs.editor.pool.__BEH__options_changed = function(a, b) {
  for (var c = cljs.core.seq.call(null, lt.objs.editor.pool.get_all.call(null)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), g = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g));
      lt.objs.editor.set_options.call(null, g, b);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (g = cljs.core.first.call(null, c), d = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g)), lt.objs.editor.set_options.call(null, d, b), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "options-changed", "lt.objs.editor.pool/options-changed", 4573736972), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__options_changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "options-changed", "options-changed", 3471589879), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "pool", "lt.objs.editor.pool/pool", 1675687809), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.pool", "editor.pool", 4270620527), null], null), null));
lt.objs.editor.pool.unsaved_QMARK_ = function() {
  return cljs.core.some.call(null, function(a) {
    return(new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  }, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679)));
};
lt.objs.editor.pool.by_path = function(a) {
  if (cljs.core.truth_(a)) {
    var b = clojure.string.lower_case.call(null, a);
    return cljs.core.filter.call(null, function(a) {
      return cljs.core._EQ_.call(null, clojure.string.lower_case.call(null, function() {
        var b = cljs.core.get.call(null, (new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "path", "path", 1017337751));
        return cljs.core.truth_(b) ? b : "";
      }()), b);
    }, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679)));
  }
  return null;
};
lt.objs.editor.pool.containing_path = function(a) {
  var b = clojure.string.lower_case.call(null, a);
  return cljs.core.filter.call(null, function(a) {
    return-1 < clojure.string.lower_case.call(null, function() {
      var b = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
      return cljs.core.truth_(b) ? b : "";
    }()).indexOf(b);
  }, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679)));
};
lt.objs.editor.pool.button = function() {
  var a = function(a, b) {
    for (var e = cljs.core.nth.call(null, b, 0, null), f = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.button.right", "div.button.right", 629503503), a], null)), g = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
      return cljs.core.truth_(e) ? e.call(null) : null;
    }], null))), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), n = cljs.core.nth.call(null, m, 0, null), m = cljs.core.nth.call(null, m, 1, null);
        lt.util.dom.on.call(null, f, n, m);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          cljs.core.chunked_seq_QMARK_.call(null, g) ? (k = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), h = k, k = cljs.core.count.call(null, k)) : (k = cljs.core.first.call(null, g), h = cljs.core.nth.call(null, k, 0, null), k = cljs.core.nth.call(null, k, 1, null), lt.util.dom.on.call(null, f, h, k), g = cljs.core.next.call(null, g), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    return f;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.editor.pool.unsaved_prompt = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "You will lose changes.", new cljs.core.Keyword(null, "body", "body", 1016933652), "If you close now, you'll lose any unsaved changes. Are you sure you want to do that?", new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Discard changes", new cljs.core.Keyword(null, "action", "action", 3885920680), a], null), lt.objs.popup.cancel_button], null)], null));
};
lt.objs.editor.pool.pool = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "pool", "lt.objs.editor.pool/pool", 1675687809));
lt.objs.editor.pool.last_active = function() {
  var a = (new cljs.core.Keyword(null, "last", "last", 1017218568)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.editor.pool.pool));
  return cljs.core.truth_(cljs.core.truth_(a) ? cljs.core.deref.call(null, a) : a) ? a : null;
};
lt.objs.editor.pool.focus_last = function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) && (a = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), cljs.core.truth_(a)) ? (lt.util.dom.focus.call(null, document.body), lt.objs.editor.focus.call(null, a)) : null;
};
lt.objs.editor.pool.__BEH__track_active = function(a) {
  return lt.object.merge_BANG_.call(null, lt.objs.editor.pool.pool, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "last", "last", 1017218568), a], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "track-active", "lt.objs.editor.pool/track-active", 2411159885), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__track_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.editor.pool.__BEH__stop_close_dirty = function(a) {
  return cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)) ? (lt.objs.app.prevent_close.call(null), lt.objs.editor.pool.unsaved_prompt.call(null, cljs.core.partial.call(null, lt.objs.app.close, !0))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "stop-close-dirty", "lt.objs.editor.pool/stop-close-dirty", 4242047991), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__stop_close_dirty, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.editor.pool.__BEH__stop_reload_dirty = function(a) {
  return cljs.core.truth_(lt.objs.editor.pool.unsaved_QMARK_.call(null)) ? (lt.objs.app.prevent_close.call(null), lt.objs.editor.pool.unsaved_prompt.call(null, lt.objs.app.refresh)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "stop-reload-dirty", "lt.objs.editor.pool/stop-reload-dirty", 1623651344), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__stop_reload_dirty, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "reload", "reload", 4374230283), null], null), null));
lt.objs.editor.pool.__BEH__ed_close = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.objs.editor.pool.unsaved_prompt.call(null, function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close.force", "close.force", 4409585383));
  }) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close.force", "close.force", 4409585383));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "ed-close", "lt.objs.editor.pool/ed-close", 2078681807), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__ed_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.editor.pool.__BEH__focus_last_on_focus = function(a) {
  return lt.objs.editor.pool.focus_last.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "focus-last-on-focus", "lt.objs.editor.pool/focus-last-on-focus", 3578091025), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__focus_last_on_focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.editor.pool.reload = function(a) {
  lt.objs.editor.set_val_and_keep_cursor.call(null, a, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))))));
  lt.objs.document.update_stats.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !1], null));
};
lt.objs.editor.pool.__BEH__watched__DOT__update = function(a, b, c) {
  return cljs.core.truth_(lt.objs.files.file_QMARK_.call(null, b)) ? (a = cljs.core.first.call(null, lt.objs.editor.pool.by_path.call(null, b)), cljs.core.truth_(a) ? lt.objs.document.check_mtime.call(null, lt.objs.document.__GT_stats.call(null, b), c) ? null : cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? null : lt.objs.editor.pool.reload.call(null, a) : null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "watched.update", "lt.objs.editor.pool/watched.update", 2487517840), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__watched__DOT__update, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.update", "watched.update", 1262966907), null], null), 
null));
lt.objs.editor.pool.set_syntax = function(a, b) {
  var c = (new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.truth_(c) && lt.object.remove_tags.call(null, a, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(c));
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280)], null), cljs.core.merge, cljs.core.dissoc.call(null, b, new cljs.core.Keyword(null, "name", "name", 1017277949)));
  lt.objs.editor.set_mode.call(null, a, (new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(b));
  return lt.object.add_tags.call(null, a, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(b));
};
lt.objs.editor.pool.set_syntax_by_path = function(a, b) {
  return lt.objs.editor.pool.set_syntax.call(null, a, lt.objs.files.path__GT_type.call(null, b));
};
lt.objs.editor.pool.__BEH__watched__DOT__delete = function(a, b) {
  for (var c = function() {
    var a = cljs.core.seq.call(null, lt.objs.editor.pool.by_path.call(null, b));
    return a ? a : cljs.core.filter.call(null, function(a) {
      return function(a) {
        a = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
        return cljs.core.truth_(a) ? cljs.core._EQ_.call(null, 0, a.indexOf([cljs.core.str(b), cljs.core.str(lt.objs.files.separator)].join(""))) : !1;
      };
    }(a), lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679)));
  }(), c = cljs.core.seq.call(null, c), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g))) || lt.object.raise.call(null, g, new cljs.core.Keyword(null, "close", "close", 1108660586));
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = e, e = g) : (g = cljs.core.first.call(null, d), cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, g))) || lt.object.raise.call(null, g, new cljs.core.Keyword(null, "close", "close", 1108660586)), c = cljs.core.next.call(null, d), 
        d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "watched.delete", "lt.objs.editor.pool/watched.delete", 1927206258), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__watched__DOT__delete, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), null], null), null));
lt.objs.editor.pool.__BEH__watched__DOT__rename = function(a, b, c) {
  if (cljs.core.truth_(lt.objs.files.file_QMARK_.call(null, b))) {
    return a = cljs.core.first.call(null, lt.objs.editor.pool.by_path.call(null, b)), cljs.core.truth_(a) ? (lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280)], null), cljs.core.assoc, new cljs.core.Keyword(null, "path", "path", 1017337751), c, new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.files.basename.call(null, c)), lt.objs.document.move_doc.call(null, 
    b, c), lt.objs.editor.pool.set_syntax_by_path.call(null, a, c), b = (new cljs.core.Keyword("lt.objs.tabs", "tabset", "lt.objs.tabs/tabset", 3378091779)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), cljs.core.truth_(b) ? lt.object.raise.call(null, b, new cljs.core.Keyword(null, "tab.updated", "tab.updated", 2727558868)) : null) : null;
  }
  a = [cljs.core.str(b), cljs.core.str(lt.objs.files.separator)].join("");
  a = cljs.core.filter.call(null, function(a) {
    return function(b) {
      return cljs.core._EQ_.call(null, 0, function() {
        var a = cljs.core.get.call(null, (new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), new cljs.core.Keyword(null, "path", "path", 1017337751));
        return cljs.core.truth_(a) ? a : "";
      }().indexOf(a));
    };
  }(a), lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor", "editor", 4001043679)));
  for (var d = cljs.core.seq.call(null, a), e = null, f = 0, g = 0;;) {
    if (g < f) {
      a = cljs.core._nth.call(null, e, g);
      var h = clojure.string.replace.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b, c);
      lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280)], null), cljs.core.assoc, new cljs.core.Keyword(null, "path", "path", 1017337751), h, new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.files.basename.call(null, h));
      lt.objs.document.move_doc.call(null, b, h);
      g += 1;
    } else {
      if (a = cljs.core.seq.call(null, d)) {
        d = a, cljs.core.chunked_seq_QMARK_.call(null, d) ? (e = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), a = e, f = cljs.core.count.call(null, e), e = a) : (a = cljs.core.first.call(null, d), e = clojure.string.replace.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b, c), lt.object.update_BANG_.call(null, 
        a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280)], null), cljs.core.assoc, new cljs.core.Keyword(null, "path", "path", 1017337751), e, new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.files.basename.call(null, e)), lt.objs.document.move_doc.call(null, b, e), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "watched.rename", "lt.objs.editor.pool/watched.rename", 1794081507), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__watched__DOT__rename, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "rename", "rename", 4374276784), null, new cljs.core.Keyword(null, 
"watched.rename", "watched.rename", 1167218416), null], null), null));
lt.objs.editor.pool.create = function(a) {
  var b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.editor", "editor", "lt.objs.editor/editor", 3793959614), a);
  lt.object.add_tags.call(null, b, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$2(a, cljs.core.PersistentVector.EMPTY));
  lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.generation", "editor.generation", 4482163627), lt.objs.editor.__GT_generation.call(null, b)], null));
  lt.object.raise.call(null, lt.objs.editor.pool.pool, new cljs.core.Keyword(null, "create", "create", 3956577390), b, a);
  lt.object.raise.call(null, b, new cljs.core.Keyword(null, "create", "create", 3956577390));
  return b;
};
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "focus-last-editor", "focus-last-editor", 3007568513), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Focus last active editor", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.editor.pool.focus_last.call(null);
}], null));
lt.objs.editor.pool.syntax_selector = lt.objs.sidebar.command.filter_list.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "items", "items", 1114430258), function() {
  return cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "name", "name", 1017277949), cljs.core.vals.call(null, (new cljs.core.Keyword(null, "types", "types", 1124748267)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.files.files_obj))));
}, new cljs.core.Keyword(null, "key", "key", 1014010321), new cljs.core.Keyword(null, "name", "name", 1017277949), new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Syntax"], null));
lt.objs.editor.pool.__BEH__set_syntax = function(a, b) {
  return lt.objs.sidebar.command.exec_active_BANG_.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "set-syntax", "lt.objs.editor.pool/set-syntax", 1300555571), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__set_syntax, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.objs.editor.pool.__BEH__init_syntax_selector = function(a) {
  return lt.object.raise.call(null, lt.objs.editor.pool.syntax_selector, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "init-syntax-selector", "lt.objs.editor.pool/init-syntax-selector", 4625833809), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__init_syntax_selector, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.object.add_behavior_BANG_.call(null, lt.objs.editor.pool.syntax_selector, new cljs.core.Keyword("lt.objs.editor.pool", "set-syntax", "lt.objs.editor.pool/set-syntax", 1300555571));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "set-syntax", "set-syntax", 2718399264), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Set current editor syntax", new cljs.core.Keyword(null, "options", "options", 4059396624), lt.objs.editor.pool.syntax_selector, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(b) ? lt.objs.editor.pool.set_syntax.call(null, b, a) : lt.objs.notifos.set_msg_BANG_.call(null, "Set syntax requires an active editor");
}], null));
lt.objs.editor.pool.__BEH__line_comment_options = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.editor.pool", "comment-options", "lt.objs.editor.pool/comment-options", 1136977589), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.pool", "line-comment-options", "lt.objs.editor.pool/line-comment-options", 1061500094), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.pool.__BEH__line_comment_options, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Set options for line commenting", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
[new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "map", new cljs.core.Keyword(null, "example", "example", 3985900764), "{:indent true}"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), 
new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.editor.pool.do_commenting = function(a) {
  var b = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(b)) {
    var c = lt.objs.editor.__GT_cursor.call(null, b, "start"), d = cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null, b)) ? lt.objs.editor.__GT_cursor.call(null, b, "end") : c, e = (new cljs.core.Keyword("lt.objs.editor.pool", "comment-options", "lt.objs.editor.pool/comment-options", 1136977589)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b));
    return a.call(null, b, c, d, e);
  }
  return null;
};
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "comment-selection", "comment-selection", 4639099664), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Comment line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), cljs.core.partial.call(null, lt.objs.editor.pool.do_commenting, lt.objs.editor.line_comment)], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "block-comment-selection", "block-comment-selection", 3383649744), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Block Comment line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), cljs.core.partial.call(null, lt.objs.editor.pool.do_commenting, lt.objs.editor.block_comment)], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "uncomment-selection", "uncomment-selection", 2316362135), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Uncomment line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), cljs.core.partial.call(null, lt.objs.editor.pool.do_commenting, lt.objs.editor.uncomment)], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "toggle-comment-selection", "toggle-comment-selection", 4499822807), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Toggle comment line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), cljs.core.partial.call(null, lt.objs.editor.pool.do_commenting, lt.objs.editor.toggle_comment)], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "indent-selection", "indent-selection", 4336275741), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Indent line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    var b = (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null, a, "start"));
    return cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null, a)) ? lt.objs.editor.indent_selection.call(null, a, "add") : lt.objs.editor.indent_line.call(null, a, b, "add");
  }
  return null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "unindent-selection", "unindent-selection", 2183138742), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Unindent line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    var b = (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(lt.objs.editor.__GT_cursor.call(null, a, "start"));
    return cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null, a)) ? lt.objs.editor.indent_selection.call(null, a, "subtract") : lt.objs.editor.indent_line.call(null, a, b, "subtract");
  }
  return null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "smart-indent-selection", "smart-indent-selection", 1741810849), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Smart indent line(s)", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.indent_selection.call(null, a, "smart") : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.selection.clear", "editor.selection.clear", 1854878812), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Clear selection", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.move_cursor.call(null, a, lt.objs.editor.__GT_cursor.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.select-all", "editor.select-all", 2519334883), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select all", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.selectAll(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.kill-line", "editor.kill-line", 891766068), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Kill line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.killLine(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-line", "editor.delete-line", 3395628871), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.deleteLine(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-line-left", "editor.delete-line-left", 4635399793), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete line left", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delLineLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.doc-start", "editor.doc-start", 1389615038), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move to first line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goDocStart(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.doc-end", "editor.doc-end", 759533239), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move to last line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goDocEnd(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-start", "editor.line-start", 2900917212), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move to start of the line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineStart(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-start-smart", "editor.line-start-smart", 944287256), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move to first non-whitespace char in the line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineStartSmart(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-end", "editor.line-end", 2110825045), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move to end of the line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineEnd(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-right", "editor.line-right", 2899671446), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Goto the right of the line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineRight(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-left", "editor.line-left", 658910833), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Goto the left of the line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-up", "editor.line-up", 3404593925), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Previous line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineUp(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.line-down", "editor.line-down", 658682636), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Next line", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goLineDown(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.page-up", "editor.page-up", 2424143498), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Page up", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goPageUp(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.page-down", "editor.page-down", 3338627409), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Page down", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goPageDown(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.char-left", "editor.char-left", 4017821775), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move left one character", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goCharLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.char-right", "editor.char-right", 3946695544), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move right one character", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goCharRight(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.column-left", "editor.column-left", 3682706575), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move left one column", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goColumnLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.column-right", "editor.column-right", 2148058936), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move right one column", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goColumnRight(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.word-left", "editor.word-left", 3345093915), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move left one word", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goWordLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.word-right", "editor.word-right", 4566968364), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move right one word", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goWordRight(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.group-left", "editor.group-left", 1117568296), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move left one group", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goGroupLeft(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.group-right", "editor.group-right", 4233150911), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Move right one group", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.goGroupRight(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-char-left", "editor.delete-char-left", 3699343439), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete character to the left", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delCharBefore(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-char-right", "editor.delete-char-right", 2663801720), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete character to the right", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delCharAfter(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-word-left", "editor.delete-word-left", 3026615579), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete word to the left", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delWordBefore(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-word-right", "editor.delete-word-right", 3284074540), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete word to the right", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delWordAfter(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-group-left", "editor.delete-group-left", 4129641768), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete group to the left", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delGroupBefore(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.delete-group-right", "editor.delete-group-right", 3118148031), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Delete group to the right", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.delGroupAfter(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.transpose-chars", "editor.transpose-chars", 4274081082), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Transpose characters", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.transposeChars(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.new-line-indent", "editor.new-line-indent", 3360183529), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Newline and indent", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.newlineAndIndent(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.toggle-overwrite", "editor.toggle-overwrite", 663200293), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Toggle overwrite", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? CodeMirror.commands.toggleOverwrite(lt.objs.editor.__GT_cm_ed.call(null, a)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.cut", "editor.cut", 3751346611), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Cut", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.cut.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.copy", "editor.copy", 4270233288), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Copy", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.copy.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.paste", "editor.paste", 3187448388), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Paste", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.paste.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.select-all", "editor.select-all", 2519334883), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select all", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.select_all.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.select-line", "editor.select-line", 4732906134), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select line", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectLine");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.force.wrap", "editor.force.wrap", 4266087424), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Toggle line wrapping in current editor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    if (cljs.core.truth_(lt.objs.editor.option.call(null, a, "lineWrapping"))) {
      return lt.object.remove_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.force.wrap", "editor.force.wrap", 4266087424)], null)), lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.force.unwrap", "editor.force.unwrap", 3860426009)], null)), lt.objs.notifos.set_msg_BANG_.call(null, "Wrapping off", new cljs.core.PersistentArrayMap(null, 
      1, [new cljs.core.Keyword(null, "timeout", "timeout", 3994960083), 2E3], null));
    }
    lt.object.remove_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.force.unwrap", "editor.force.unwrap", 3860426009)], null));
    lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.force.wrap", "editor.force.wrap", 4266087424)], null));
    return lt.objs.notifos.set_msg_BANG_.call(null, "Wrapping on", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "timeout", "timeout", 3994960083), 2E3], null));
  }
  return null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.undo", "editor.undo", 4270768183), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Undo", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.undo.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.redo", "editor.redo", 4270670161), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Redo", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.redo.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Execute a CodeMirror command", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = function(a, b) {
    var e = lt.objs.editor.pool.last_active.call(null);
    if (cljs.core.truth_(e)) {
      var f = CodeMirror.commands[a];
      return cljs.core.truth_(f) ? cljs.core._EQ_.call(null, CodeMirror.Pass, cljs.core.apply.call(null, f, lt.objs.editor.__GT_cm_ed.call(null, e), b)) ? lt.objs.keyboard.passthrough.call(null) : null : null;
    }
    return null;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}()], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.fold-code", "editor.fold-code", 2976735338), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Fold code at cursor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.fold_code.call(null, a) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.singleSelectionTop", "editor.sublime.singleSelectionTop", 3543136669), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Set selection to top most cursor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "singleSelectionTop");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.singleSelectionTop", "editor.sublime.singleSelectionTop", 3543136669), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Clear multiple cursors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "singleSelectionTop");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.insertLineAfter", "editor.sublime.insertLineAfter", 935888807), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Insert line after", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "insertLineAfter");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.insertLineBefore", "editor.sublime.insertLineBefore", 2917691320), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Insert line before", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "insertLineBefore");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.selectNextOccurrence", "editor.sublime.selectNextOccurrence", 2958133196), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select next occurrence of word", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectNextOccurrence");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.selectBetweenBrackets", "editor.sublime.selectBetweenBrackets", 2949510127), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select between brackets", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectBetweenBrackets");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.selectScope", "editor.sublime.selectScope", 4149085648), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select scope", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectScope");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.goToBracket", "editor.sublime.goToBracket", 3682815165), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Go to bracket", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "goToBracket");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.swapLineUp", "editor.sublime.swapLineUp", 3809639470), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Swap line up", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "swapLineUp");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.swapLineDown", "editor.sublime.swapLineDown", 3360394741), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Swap line down", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "swapLineDown");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.joinLines", "editor.sublime.joinLines", 2158627981), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Join lines", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "joinLines");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.duplicateLine", "editor.sublime.duplicateLine", 3547844919), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Duplicate line", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "duplicateLine");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.sortLines", "editor.sublime.sortLines", 2640780441), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Sort lines", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "sortLines");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.sortLinesInsensitive", "editor.sublime.sortLinesInsensitive", 948322012), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Sort lines insensitive", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "sortLinesInsensitive");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.selectLinesUpward", "editor.sublime.selectLinesUpward", 3377312626), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select lines upward with multiple cursors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectLinesUpward");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.selectLinesDownward", "editor.sublime.selectLinesDownward", 4068276153), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Select lines downward with multiple cursors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "selectLinesDownward");
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.sublime.splitSelectionByLine", "editor.sublime.splitSelectionByLine", 1824418217), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Split selection into cursors per line", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.codemirror.command", "editor.codemirror.command", 3862266076), "splitSelectionByLine");
}], null));
clojure.walk = {};
clojure.walk.walk = function(a, b, c) {
  return cljs.core.seq_QMARK_.call(null, c) ? b.call(null, cljs.core.doall.call(null, cljs.core.map.call(null, a, c))) : cljs.core.coll_QMARK_.call(null, c) ? b.call(null, cljs.core.into.call(null, cljs.core.empty.call(null, c), cljs.core.map.call(null, a, c))) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? b.call(null, c) : null;
};
clojure.walk.postwalk = function postwalk(b, c) {
  return clojure.walk.walk.call(null, cljs.core.partial.call(null, postwalk, b), b, c);
};
clojure.walk.prewalk = function prewalk(b, c) {
  return clojure.walk.walk.call(null, cljs.core.partial.call(null, prewalk, b), cljs.core.identity, b.call(null, c));
};
clojure.walk.keywordize_keys = function(a) {
  var b = function(a) {
    var b = cljs.core.nth.call(null, a, 0, null);
    a = cljs.core.nth.call(null, a, 1, null);
    return "string" === typeof b ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, b), a], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, a], null);
  };
  return clojure.walk.postwalk.call(null, function(a) {
    return cljs.core.map_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, b, a)) : a;
  }, a);
};
clojure.walk.stringify_keys = function(a) {
  var b = function(a) {
    var b = cljs.core.nth.call(null, a, 0, null);
    a = cljs.core.nth.call(null, a, 1, null);
    return b instanceof cljs.core.Keyword ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.name.call(null, b), a], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, a], null);
  };
  return clojure.walk.postwalk.call(null, function(a) {
    return cljs.core.map_QMARK_.call(null, a) ? cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, b, a)) : a;
  }, a);
};
clojure.walk.prewalk_replace = function(a, b) {
  return clojure.walk.prewalk.call(null, function(b) {
    return cljs.core.contains_QMARK_.call(null, a, b) ? a.call(null, b) : b;
  }, b);
};
clojure.walk.postwalk_replace = function(a, b) {
  return clojure.walk.postwalk.call(null, function(b) {
    return cljs.core.contains_QMARK_.call(null, a, b) ? a.call(null, b) : b;
  }, b);
};
lt.objs.console = {};
lt.objs.console.console_limit = 50;
lt.objs.console.util_inspect = require("util").inspect;
lt.objs.console.logs_dir = lt.objs.files.lt_user_dir.call(null, "logs");
lt.objs.console.core_log = function() {
  try {
    return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.console.logs_dir)) || (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.lt_user_dir.call(null))) || lt.objs.files.mkdir.call(null, lt.objs.files.lt_user_dir.call(null)), lt.objs.files.mkdir.call(null, lt.objs.console.logs_dir)), require("fs").createWriteStream(lt.objs.files.join.call(null, lt.objs.console.logs_dir, [cljs.core.str("window"), cljs.core.str(lt.objs.app.window_number.call(null)), cljs.core.str(".log")].join("")));
  } catch (a) {
    return console.error([cljs.core.str("Failed to initialize the log writer: "), cljs.core.str(a)].join(""));
  }
}();
lt.objs.console.__GT_ui = function(a) {
  return lt.object.__GT_content.call(null, a);
};
lt.objs.console.dom_like_QMARK_ = function(a) {
  var b = cljs.core.vector_QMARK_.call(null, a);
  if (b) {
    return b;
  }
  b = a.nodeType;
  return cljs.core.truth_(b) ? b : "string" === typeof a;
};
lt.objs.console.write = function(a, b) {
  cljs.core.count.call(null, lt.util.dom.children.call(null, a)) > lt.objs.console.console_limit - 1 && lt.util.dom.remove.call(null, lt.util.dom.children.call(null, a)[0]);
  lt.objs.bottombar.active_QMARK_.call(null, lt.objs.console.console) || lt.objs.statusbar.dirty.call(null);
  return lt.util.dom.append.call(null, a, b);
};
lt.objs.console.write_to_log = function(a) {
  return cljs.core.truth_(lt.objs.console.core_log) ? lt.objs.console.core_log.write(a) : null;
};
var group__6463__auto___7707 = cljs.core.swap_BANG_.call(null, crate.core.group_id, cljs.core.inc);
lt.objs.console.__GT_item = function() {
  var a = function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), e = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), e], null), a], null));
    e.setAttribute("crateGroup", group__6463__auto___7707);
    return e;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.console.__GT_item.prototype._crateGroup = group__6463__auto___7707;
lt.objs.console.log = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(b, c) {
    return a.call(null, b, c, null);
  }, d = function(a, b, c) {
    if (!cljs.core._EQ_.call(null, "", a)) {
      var d = lt.objs.console.__GT_ui.call(null, lt.objs.console.console);
      cljs.core.truth_(function() {
        var b = "string" === typeof a;
        return b ? b : c;
      }()) && (lt.objs.console.write_to_log.call(null, "string" === typeof a ? a : c), lt.objs.console.write.call(null, d, lt.objs.console.__GT_item.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), cljs.core.not.call(null, lt.objs.console.dom_like_QMARK_.call(null, a)) ? cljs.core.pr_str.call(null, a) : a], null), b)), lt.util.dom.scroll_top.call(null, d, 1E10));
    }
    return null;
  }, a = function(a, f, g) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, f);
      case 3:
        return d.call(this, a, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  return a;
}();
lt.objs.console.error = function() {
  var a = function(a) {
    lt.objs.statusbar.console_class.call(null, "error");
    a = cljs.core.seq.call(null, a);
    for (var b = null, e = 0, f = 0;;) {
      if (f < e) {
        var g = cljs.core._nth.call(null, b, f);
        lt.objs.console.log.call(null, "" + cljs.core.str(cljs.core.truth_(g.stack) ? g.stack : "string" === typeof g ? g : cljs.core.not_EQ_.call(null, cljs.core.pr_str.call(null, g), "[object Object]") ? cljs.core.pr_str.call(null, g) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? "" + cljs.core.str(g) : null), "error");
        f += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), e = cljs.core.chunk_rest.call(null, b), b = a, g = cljs.core.count.call(null, a), a = e, e = g) : (g = cljs.core.first.call(null, b), lt.objs.console.log.call(null, "" + cljs.core.str(cljs.core.truth_(g.stack) ? g.stack : "string" === typeof g ? g : cljs.core.not_EQ_.call(null, cljs.core.pr_str.call(null, g), "[object Object]") ? cljs.core.pr_str.call(null, g) : new cljs.core.Keyword(null, "else", 
          "else", 1017020587) ? "" + cljs.core.str(g) : null), "error"), a = cljs.core.next.call(null, b), b = null, e = 0), f = 0;
        } else {
          return null;
        }
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
process.on("uncaughtException", function(a) {
  return lt.objs.console.error.call(null, a);
});
lt.objs.console.console_ui = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.console", "ul.console", 1376481394)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.console.__BEH__on_close = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458), new cljs.core.Keyword(null, "bottom", "bottom", 3925642653)], null));
  return lt.objs.tabs.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "on-close", "lt.objs.console/on-close", 3910850223), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "console", "lt.objs.console/console", 4459732666), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "console", "console", 1965414601), null], null), null), new cljs.core.Keyword(null, "name", "name", 1017277949), "console", new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !1, new cljs.core.Keyword(null, 
"init", "init", 1017141378), function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458), new cljs.core.Keyword(null, "bottom", "bottom", 3925642653)], null));
  return lt.objs.console.console_ui.call(null, a);
});
lt.objs.console.__BEH__set_console_limit = function(a, b) {
  return lt.objs.console.console_limit = b;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "set-console-limit", "lt.objs.console/set-console-limit", 868332415), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__set_console_limit, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Set buffer size", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "size"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.console.inspect = function(a) {
  return lt.objs.console.util_inspect.call(null, a, !1, 2);
};
lt.objs.console.verbatim = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(b, c) {
    return a.call(null, b, c, null);
  }, d = function(a, b, c) {
    var d = lt.objs.console.__GT_ui.call(null, lt.objs.console.console);
    cljs.core.truth_(c) && lt.objs.console.write_to_log.call(null, c);
    cljs.core.truth_(b) && lt.objs.statusbar.console_class.call(null, b);
    lt.objs.console.write.call(null, d, lt.objs.console.__GT_item.call(null, a, b));
    lt.util.dom.scroll_top.call(null, d, 1E10);
    return null;
  }, a = function(a, f, g) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, f);
      case 3:
        return d.call(this, a, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  return a;
}();
lt.objs.console.try_update = function(a) {
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "id", "id", 1013907597));
  b = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "content", "content", 1965434859));
  return cljs.core.truth_(a) && (a = lt.util.dom.$.call(null, [cljs.core.str("#console"), cljs.core.str(a)].join(""), lt.objs.console.__GT_ui.call(null, lt.objs.console.console)), cljs.core.truth_(a)) ? (lt.util.dom.append.call(null, a, lt.util.dom.text_node.call(null, b)), !0) : null;
};
lt.objs.console.loc_log = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  var b = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "id", "id", 1013907597)), c = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "str-content", "str-content", 1379403855)), d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "class", "class", 1108647146)), e = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "content", "content", 1965434859)), f = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "line", "line", 1017226086)), g = cljs.core.get.call(null, 
  a, new cljs.core.Keyword(null, "file", "file", 1017047278));
  return cljs.core.truth_(e) ? (cljs.core.truth_(function() {
    var a = "string" === typeof e;
    return a ? a : c;
  }()) && lt.objs.console.write_to_log.call(null, [cljs.core.str(g), cljs.core.str("["), cljs.core.str(f), cljs.core.str("]: "), cljs.core.str("string" === typeof e ? e : c), cljs.core.str("\n")].join("")), cljs.core.truth_(lt.objs.console.try_update.call(null, a)) ? null : lt.objs.console.verbatim.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "table", "table", 1124020032), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "tr", "tr", 1013907952), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td.loc", "td.loc", 4428715572), new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "em.file", "em.file", 3623665268), g, cljs.core.truth_(f) ? new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "em.line", "em.line", 
  3623844076), "[", f, "]"], null) : null, ": "], null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td", "td", 1013907938), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), cljs.core.truth_(b) ? new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "id", "id", 1013907597), [cljs.core.str("console"), cljs.core.str(b)].join("")], 
  null) : null, "string" === typeof e ? clojure.string.replace.call(null, e, /^\s+/, "") : e], null)], null)], null)], null), d)) : null;
};
lt.objs.console.clear = function() {
  return lt.util.dom.empty.call(null, lt.objs.console.__GT_ui.call(null, lt.objs.console.console));
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "sidebar.console", "lt.objs.console/sidebar.console", 2213486188), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "console", "console", 1965414601), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "console", new cljs.core.Keyword(null, "order", "order", 1119910592), 4, new cljs.core.Keyword(null, 
"init", "init", 1017141378), function(a) {
  return lt.objs.console.console_ui.call(null, a);
});
lt.objs.console.console = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.console", "console", "lt.objs.console/console", 4459732666));
lt.objs.console.__BEH__menu_PLUS_ = function(a, b, c) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Clear", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "clear-console", "clear-console", 2279593289));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Copy", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    var a = c.target;
    cljs.core._EQ_.call(null, a.tagName.toLowerCase(), "li") || lt.util.dom.parents.call(null, a, "ul.console li");
    return lt.objs.platform.copy.call(null, a.textContent);
  }], null), cljs.core.not_EQ_.call(null, new cljs.core.Keyword(null, "tab", "tab", 1014018823), (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console))) ? new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Hide console", new cljs.core.Keyword(null, "order", "order", 1119910592), 3, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "toggle-console", "toggle-console", 4454540112));
  }], null) : null, cljs.core.not_EQ_.call(null, new cljs.core.Keyword(null, "tab", "tab", 1014018823), (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console))) ? new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Open console tab", new cljs.core.Keyword(null, "order", "order", 1119910592), 4, new cljs.core.Keyword(null, "click", "click", 1108654330), 
  function() {
    lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "toggle-console", "toggle-console", 4454540112));
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "console-tab", "console-tab", 3389753745));
  }], null) : null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "menu+", "lt.objs.console/menu+", 4199189645), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.console.__BEH__statusbar_console_toggle = function(a) {
  lt.object.raise.call(null, lt.objs.bottombar.bottombar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.console.console);
  return lt.objs.bottombar.active_QMARK_.call(null, lt.objs.console.console) ? (lt.util.dom.scroll_top.call(null, lt.object.__GT_content.call(null, lt.objs.console.console), 1E10), lt.objs.statusbar.clean.call(null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "statusbar-console-toggle", "lt.objs.console/statusbar-console-toggle", 510309147), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__statusbar_console_toggle, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), null], null), null));
lt.objs.console.__BEH__statusbar_console_show = function(a) {
  lt.object.raise.call(null, lt.objs.bottombar.bottombar, new cljs.core.Keyword(null, "show!", "show!", 1123317814), lt.objs.console.console);
  return lt.objs.bottombar.active_QMARK_.call(null, lt.objs.console.console) ? (lt.util.dom.scroll_top.call(null, lt.object.__GT_content.call(null, lt.objs.console.console), 1E10), lt.objs.statusbar.clean.call(null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "statusbar-console-show", "lt.objs.console/statusbar-console-show", 4407857938), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__statusbar_console_show, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show!", "show!", 1123317814), null], null), null));
lt.objs.console.__BEH__statusbar_console_hide = function(a) {
  return lt.object.raise.call(null, lt.objs.bottombar.bottombar, new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), lt.objs.console.console);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.console", "statusbar-console-hide", "lt.objs.console/statusbar-console-hide", 4457881813), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.console.__BEH__statusbar_console_hide, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), null], null), null));
lt.objs.bottombar.add_item.call(null, lt.objs.console.console);
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "console-tab", "console-tab", 3389753745), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Open the console in a tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return cljs.core.not_EQ_.call(null, new cljs.core.Keyword(null, "tab", "tab", 1014018823), (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console))) ? (lt.object.raise.call(null, lt.objs.statusbar.console_toggle, new cljs.core.Keyword(null, "hide!", "hide!", 1113177745)), lt.object.merge_BANG_.call(null, lt.objs.console.console, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "current-ui", 
  "current-ui", 4219850458), new cljs.core.Keyword(null, "tab", "tab", 1014018823)], null)), lt.objs.tabs.add_BANG_.call(null, lt.objs.console.console)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "console.show", "console.show", 1651695782), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Show console", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console)), new cljs.core.Keyword(null, "tab", "tab", 1014018823)) ? (lt.objs.tabs.active_BANG_.call(null, lt.objs.console.console), lt.objs.statusbar.clean.call(null)) : lt.object.raise.call(null, lt.objs.statusbar.console_toggle, new cljs.core.Keyword(null, "show!", "show!", 1123317814));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "console.hide", "console.hide", 1651368683), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Hide console", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console)), new cljs.core.Keyword(null, "tab", "tab", 1014018823)) ? lt.object.raise.call(null, lt.objs.console.console, new cljs.core.Keyword(null, "close", "close", 1108660586)) : lt.object.raise.call(null, lt.objs.statusbar.console_toggle, new cljs.core.Keyword(null, "hide!", "hide!", 1113177745));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "toggle-console", "toggle-console", 4454540112), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Toggle console", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "current-ui", "current-ui", 4219850458)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.console.console)), new cljs.core.Keyword(null, "tab", "tab", 1014018823)) ? (lt.objs.tabs.active_BANG_.call(null, lt.objs.console.console), lt.objs.statusbar.clean.call(null)) : lt.object.raise.call(null, lt.objs.statusbar.console_toggle, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "clear-console", "clear-console", 2279593289), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Console: Clear console", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  a = cljs.core.seq.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "clients.devtools", "clients.devtools", 2282697598)));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.object.raise.call(null, e, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (a = cljs.core.first.call(null, b), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        break;
      }
    }
  }
  return lt.objs.console.clear.call(null);
}], null));
lt.objs.workspace = {};
lt.objs.workspace.fs = require("fs");
lt.objs.workspace.max_depth = 10;
lt.objs.workspace.watch_interval = 1E3;
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "workspace", "lt.objs.workspace/workspace", 619438026), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "workspace", "workspace", 2122768391), null], null), null), new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "folders", "folders", 
4625622327), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "watches", "watches", 2139868463), cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978), "", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return null;
});
lt.objs.workspace.current_ws = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.workspace", "workspace", "lt.objs.workspace/workspace", 619438026));
lt.objs.workspace.unwatch = function(a, b, c) {
  if (cljs.core.truth_(a)) {
    c = cljs.core.coll_QMARK_.call(null, b) ? b : cljs.core.not.call(null, c) ? new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.filter.call(null, function(a) {
      return-1 < a.indexOf(b);
    }, cljs.core.keys.call(null, a)) : null;
    for (var d = cljs.core.seq.call(null, cljs.core.map.call(null, a, c)), e = null, f = 0, g = 0;;) {
      if (g < f) {
        var h = cljs.core._nth.call(null, e, g);
        cljs.core.truth_(function() {
          var a = h;
          return cljs.core.truth_(a) ? (new cljs.core.Keyword(null, "close", "close", 1108660586)).cljs$core$IFn$_invoke$arity$1(h) : a;
        }()) && (new cljs.core.Keyword(null, "close", "close", 1108660586)).cljs$core$IFn$_invoke$arity$1(h).call(null);
        g += 1;
      } else {
        if (d = cljs.core.seq.call(null, d)) {
          e = d;
          if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
            d = cljs.core.chunk_first.call(null, e), g = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = g;
          } else {
            var k = cljs.core.first.call(null, e);
            cljs.core.truth_(function() {
              var a = k;
              return cljs.core.truth_(a) ? (new cljs.core.Keyword(null, "close", "close", 1108660586)).cljs$core$IFn$_invoke$arity$1(k) : a;
            }()) && (new cljs.core.Keyword(null, "close", "close", 1108660586)).cljs$core$IFn$_invoke$arity$1(k).call(null);
            d = cljs.core.next.call(null, e);
            e = null;
            f = 0;
          }
          g = 0;
        } else {
          break;
        }
      }
    }
    return cljs.core.apply.call(null, cljs.core.dissoc, a, c);
  }
  return null;
};
lt.objs.workspace.unwatch_BANG_ = function() {
  var a = null, b = function(b) {
    return a.call(null, b, !1);
  }, c = function(a, b) {
    return lt.object.merge_BANG_.call(null, lt.objs.workspace.current_ws, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watches", "watches", 2139868463), lt.objs.workspace.unwatch.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), a, b)], null));
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.workspace.alert_file = function(a) {
  return function(b, c) {
    if (cljs.core.truth_(lt.objs.workspace.fs.existsSync(a))) {
      return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.update", "watched.update", 1262966907), a, b);
    }
    lt.objs.workspace.unwatch_BANG_.call(null, a);
    return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), a);
  };
};
lt.objs.workspace.file__GT_watch = function(a) {
  var b = lt.objs.workspace.alert_file.call(null, a);
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "path", "path", 1017337751), a, new cljs.core.Keyword(null, "alert", "alert", 1106803918), b, new cljs.core.Keyword(null, "close", "close", 1108660586), function() {
    return lt.objs.workspace.fs.unwatchFile(a, b);
  }], null);
};
lt.objs.workspace.watch_BANG_ = function() {
  var a = null, b = function(b) {
    return a.call(null, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), b, null);
  }, c = function(b, c) {
    return a.call(null, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), b, c);
  }, d = function(b, c, d) {
    c = cljs.core.seq.call(null, cljs.core.coll_QMARK_.call(null, c) ? c : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [c], null));
    for (var h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l);
        if (!cljs.core.truth_(cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, m))) {
          if (cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, m))) {
            var n = cljs.core.not.call(null, d) ? 0 : "number" === typeof d ? d - 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.workspace.max_depth : null, p = lt.objs.workspace.folder__GT_watch.call(null, m);
            cljs.core.truth_(cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), m)) || (cljs.core.assoc_BANG_.call(null, b, m, p), lt.objs.workspace.fs.watchFile(m, {interval:lt.objs.workspace.watch_interval, persistent:!1}, (new cljs.core.Keyword(null, "alert", "alert", 1106803918)).cljs$core$IFn$_invoke$arity$1(p)));
            -1 < n && a.call(null, b, lt.objs.files.full_path_ls.call(null, m), n);
          } else {
            cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), m)) && cljs.core.not.call(null, cljs.core.get.call(null, b, m)) && (n = lt.objs.workspace.file__GT_watch.call(null, m), cljs.core.assoc_BANG_.call(null, b, m, n), lt.objs.workspace.fs.watchFile(m, {interval:lt.objs.workspace.watch_interval, persistent:!1}, (new cljs.core.Keyword(null, 
            "alert", "alert", 1106803918)).cljs$core$IFn$_invoke$arity$1(n)));
          }
        }
        l += 1;
      } else {
        if (c = cljs.core.seq.call(null, c)) {
          cljs.core.chunked_seq_QMARK_.call(null, c) ? (k = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = k, k = cljs.core.count.call(null, k)) : (h = cljs.core.first.call(null, c), cljs.core.truth_(cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, h)) || (cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, h)) ? (k = cljs.core.not.call(null, d) ? 0 : "number" === typeof d ? d - 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.workspace.max_depth : 
          null, l = lt.objs.workspace.folder__GT_watch.call(null, h), cljs.core.truth_(cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), h)) || (cljs.core.assoc_BANG_.call(null, b, h, l), lt.objs.workspace.fs.watchFile(h, {interval:lt.objs.workspace.watch_interval, persistent:!1}, (new cljs.core.Keyword(null, "alert", "alert", 1106803918)).cljs$core$IFn$_invoke$arity$1(l))), 
          -1 < k && a.call(null, b, lt.objs.files.full_path_ls.call(null, h), k)) : cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), h)) && cljs.core.not.call(null, cljs.core.get.call(null, b, h)) && (k = lt.objs.workspace.file__GT_watch.call(null, h), cljs.core.assoc_BANG_.call(null, b, h, k), lt.objs.workspace.fs.watchFile(h, {interval:lt.objs.workspace.watch_interval, 
          persistent:!1}, (new cljs.core.Keyword(null, "alert", "alert", 1106803918)).cljs$core$IFn$_invoke$arity$1(k)))), c = cljs.core.next.call(null, c), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    return "number" === typeof d ? null : lt.object.update_BANG_.call(null, lt.objs.workspace.current_ws, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "watches", "watches", 2139868463)], null), cljs.core.merge, cljs.core.persistent_BANG_.call(null, b));
  }, a = function(a, f, g) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, f);
      case 3:
        return d.call(this, a, f, g);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  a.cljs$core$IFn$_invoke$arity$3 = d;
  return a;
}();
lt.objs.workspace.alert_folder = function(a) {
  return function(b, c) {
    if (cljs.core.truth_(lt.objs.workspace.fs.existsSync(a))) {
      var d = (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), d = cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
        return function(b) {
          return cljs.core.not.call(null, cljs.core.get.call(null, a, b)) && cljs.core.not.call(null, cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, b));
        };
      }(d), lt.objs.files.full_path_ls.call(null, a)));
      return cljs.core.truth_(d) ? (lt.objs.workspace.watch_BANG_.call(null, d), lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.create", "watched.create", 749519022), d, lt.objs.workspace.fs.statSync(d))) : null;
    }
    lt.objs.workspace.unwatch_BANG_.call(null, a, new cljs.core.Keyword(null, "recursive", "recursive", 2179684260));
    return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), a);
  };
};
lt.objs.workspace.folder__GT_watch = function(a) {
  var b = lt.objs.workspace.alert_folder.call(null, a);
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "path", "path", 1017337751), a, new cljs.core.Keyword(null, "alert", "alert", 1106803918), b, new cljs.core.Keyword(null, "close", "close", 1108660586), function() {
    return lt.objs.workspace.fs.unwatchFile(a, b);
  }], null);
};
lt.objs.workspace.stop_watching = function(a) {
  return lt.objs.workspace.unwatch_BANG_.call(null, cljs.core.keys.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.objs.workspace.watch_workspace = function(a) {
  lt.objs.workspace.stop_watching.call(null, a);
  return lt.objs.workspace.watch_BANG_.call(null, lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "watch-paths+", "watch-paths+", 2265407277), cljs.core.PersistentVector.EMPTY));
};
lt.objs.workspace.workspace_cache_path = lt.objs.files.join.call(null, lt.objs.cache.cache_path, "workspace");
lt.objs.workspace.files_and_folders = function(a) {
  return cljs.core.reduce.call(null, function(a, c) {
    var d = lt.objs.files.dir_QMARK_.call(null, c);
    return cljs.core.truth_(cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, [cljs.core.str(lt.objs.files.basename.call(null, c)), cljs.core.str(cljs.core.truth_(d) ? lt.objs.files.separator : null)].join(""))) ? a : cljs.core.truth_(d) ? cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), cljs.core.conj, c) : cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 
    1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.conj, c);
  }, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY], null), lt.objs.files.full_path_ls.call(null, a));
};
lt.objs.workspace.serialize = function(a) {
  return cljs.core.select_keys.call(null, a, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473), new cljs.core.Keyword(null, "folders", "folders", 4625622327), new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)], null));
};
lt.objs.workspace.reconstitute = function(a, b) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set!", "set!", 1017430897), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "files", "files", 1111338473), (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.filter.call(null, lt.objs.files.exists_QMARK_, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(b)), 
  new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978), (new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)).cljs$core$IFn$_invoke$arity$1(b)], null));
};
lt.objs.workspace.add_BANG_ = function(a, b, c) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), cljs.core.conj, c);
};
lt.objs.workspace.remove_BANG_ = function(a, b, c) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), function(a) {
    return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([c], !0), a));
  });
};
lt.objs.workspace.new_cached_file = function() {
  return[cljs.core.str(lt.util.js.now.call(null)), cljs.core.str(".clj")].join("");
};
lt.objs.workspace.file__GT_ws = function(a) {
  return cljs.core.assoc.call(null, cljs.reader.read_string.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, a))), new cljs.core.Keyword(null, "path", "path", 1017337751), a);
};
lt.objs.workspace.save = function(a, b) {
  lt.objs.files.save.call(null, lt.objs.files.join.call(null, lt.objs.workspace.workspace_cache_path, b), cljs.core.pr_str.call(null, lt.objs.workspace.serialize.call(null, cljs.core.deref.call(null, a))));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save", "save", 1017427183));
};
lt.objs.workspace.open = function(a, b) {
  var c = -1 < b.indexOf(lt.objs.files.separator) ? b : lt.objs.files.join.call(null, lt.objs.workspace.workspace_cache_path, b);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.workspace.new_cached_file.call(null)], null));
  try {
    return lt.objs.workspace.reconstitute.call(null, a, lt.objs.workspace.file__GT_ws.call(null, c)), lt.objs.workspace.save.call(null, a, (new cljs.core.Keyword(null, "file", "file", 1017047278)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), lt.objs.files.delete_BANG_.call(null, c);
  } catch (d) {
    return lt.objs.console.error.call(null, d);
  }
};
lt.objs.workspace.cached = function() {
  return cljs.core.filter.call(null, function(a) {
    return-1 < a.indexOf(".clj");
  }, lt.objs.files.full_path_ls.call(null, lt.objs.workspace.workspace_cache_path));
};
lt.objs.workspace.all = function() {
  for (var a = cljs.core.sort.call(null, cljs.core._GT_, lt.objs.workspace.cached.call(null)), b = cljs.core.seq.call(null, cljs.core.drop.call(null, 20, a)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.objs.files.delete_BANG_.call(null, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.objs.files.delete_BANG_.call(null, b), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.map.call(null, lt.objs.workspace.file__GT_ws, cljs.core.take.call(null, 20, a));
};
lt.objs.workspace.ws_empty_QMARK_ = function(a) {
  return!(cljs.core.seq.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) || cljs.core.seq.call(null, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.objs.workspace.__BEH__serialize_workspace = function(a) {
  cljs.core.truth_(cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "file", "file", 1017047278))) || lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.workspace.new_cached_file.call(null)], null));
  return cljs.core.truth_(function() {
    var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "initialized?", "initialized?", 613820253));
    return cljs.core.truth_(b) ? !lt.objs.workspace.ws_empty_QMARK_.call(null, a) : b;
  }()) ? lt.objs.workspace.save.call(null, a, (new cljs.core.Keyword(null, "file", "file", 1017047278)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "serialize-workspace", "lt.objs.workspace/serialize-workspace", 966599259), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__serialize_workspace, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "serialize!", "serialize!", 4710885555), null, new cljs.core.Keyword(null, 
"updated", "updated", 779473965), null], null), null));
lt.objs.workspace.__BEH__reconstitute_last_workspace = function(a) {
  lt.objs.app.first_window_QMARK_.call(null) && cljs.core.not.call(null, (new cljs.core.Keyword(null, "initialized", "initialized", 2247924294)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws))) && (a = cljs.core.first.call(null, lt.objs.workspace.all.call(null)), cljs.core.truth_(a) && lt.objs.workspace.open.call(null, lt.objs.workspace.current_ws, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(a))));
  return lt.object.merge_BANG_.call(null, lt.objs.workspace.current_ws, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "initialized?", "initialized?", 613820253), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "reconstitute-last-workspace", "lt.objs.workspace/reconstitute-last-workspace", 3568425507), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__reconstitute_last_workspace, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "post-init", "post-init", 2970371471), 
null], null), null));
lt.objs.workspace.__BEH__new_BANG_ = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.workspace.new_cached_file.call(null)], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "new!", "lt.objs.workspace/new!", 1591819718), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__new_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "new!", "new!", 1017282035), null], null), null));
lt.objs.workspace.__BEH__add_file_BANG_ = function(a, b) {
  if (cljs.core.contains_QMARK_.call(null, cljs.core.set.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b)) {
    return lt.objs.notifos.set_msg_BANG_.call(null, "This file is already in your workspace.", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  lt.objs.workspace.add_BANG_.call(null, a, new cljs.core.Keyword(null, "files", "files", 1111338473), b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "add", "add", 1014000659), b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "add-file!", "lt.objs.workspace/add-file!", 2702786158), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__add_file_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "add.file!", "add.file!", 4237252106), null], null), null));
lt.objs.workspace.__BEH__add_folder_BANG_ = function(a, b) {
  if (cljs.core.contains_QMARK_.call(null, cljs.core.set.call(null, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b)) {
    return lt.objs.notifos.set_msg_BANG_.call(null, "This folder is already in your workspace.", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  lt.objs.workspace.add_BANG_.call(null, a, new cljs.core.Keyword(null, "folders", "folders", 4625622327), b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "add", "add", 1014000659), b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "add-folder!", "lt.objs.workspace/add-folder!", 3399790716), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__add_folder_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), null], null), null));
lt.objs.workspace.__BEH__remove_file_BANG_ = function(a, b) {
  lt.objs.workspace.remove_BANG_.call(null, a, new cljs.core.Keyword(null, "files", "files", 1111338473), b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "remove", "remove", 4374260726), b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "remove-file!", "lt.objs.workspace/remove-file!", 4736710351), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__remove_file_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "remove.file!", "remove.file!", 3382976429), null], null), null));
lt.objs.workspace.__BEH__remove_folder_BANG_ = function(a, b) {
  lt.objs.workspace.remove_BANG_.call(null, a, new cljs.core.Keyword(null, "folders", "folders", 4625622327), b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "remove", "remove", 4374260726), b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "remove-folder!", "lt.objs.workspace/remove-folder!", 2848800157), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__remove_folder_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "remove.folder!", "remove.folder!", 1531423099), null], null), null));
lt.objs.workspace.__BEH__rename_BANG_ = function(a, b, c) {
  var d = cljs.core.truth_(lt.objs.files.file_QMARK_.call(null, b)) ? new cljs.core.Keyword(null, "files", "files", 1111338473) : new cljs.core.Keyword(null, "folders", "folders", 4625622327);
  lt.objs.workspace.remove_BANG_.call(null, a, d, b);
  lt.objs.workspace.add_BANG_.call(null, a, d, c);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename", "rename", 4374276784), b, c);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "rename!", "lt.objs.workspace/rename!", 535270440), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__rename_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename!", "rename!", 2106237973), null], null), null));
lt.objs.workspace.__BEH__clear_BANG_ = function(a) {
  var b = cljs.core.deref.call(null, a);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978), ""], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set", "set", 1014018004), b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "clear!", "lt.objs.workspace/clear!", 2982360823), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.workspace.__BEH__set_BANG_ = function(a, b) {
  var c = cljs.core.deref.call(null, a);
  lt.object.merge_BANG_.call(null, a, b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set", "set", 1014018004), c);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "updated", "updated", 779473965));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "set!", "lt.objs.workspace/set!", 1594750020), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__set_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set!", "set!", 1017430897), null], null), null));
lt.objs.workspace.__BEH__watch_on_set = function(a) {
  return lt.objs.workspace.watch_workspace.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "watch-on-set", "lt.objs.workspace/watch-on-set", 1548262069), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__watch_on_set, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set", "set", 1014018004), null], null), null));
lt.objs.workspace.__BEH__stop_watch_on_close = function(a) {
  return lt.objs.workspace.stop_watching.call(null, lt.objs.workspace.current_ws);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "stop-watch-on-close", "lt.objs.workspace/stop-watch-on-close", 2718554488), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__stop_watch_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "close", "close", 1108660586), null, new cljs.core.Keyword(null, 
"refresh", "refresh", 2099349069), null], null), null));
lt.objs.workspace.__BEH__init_workspace_cache_dir = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.workspace.workspace_cache_path)) ? null : lt.objs.files.mkdir.call(null, lt.objs.workspace.workspace_cache_path);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.workspace", "init-workspace-cache-dir", "lt.objs.workspace/init-workspace-cache-dir", 1768943762), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.workspace.__BEH__init_workspace_cache_dir, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.new", "workspace.new", 2700812345), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Create new workspace", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "new!", "new!", 1017282035));
}], null));
lt.objs.settings = {};
lt.objs.settings.safe_read = function(a, b) {
  if (cljs.core.truth_(a)) {
    try {
      return cljs.reader.read_string.call(null, a);
    } catch (c) {
      return lt.objs.console.error.call(null, [cljs.core.str("Invalid settings file: "), cljs.core.str(b), cljs.core.str("\n"), cljs.core.str(c)].join("")), null;
    }
  } else {
    return null;
  }
};
lt.objs.settings._PLUS_behaviors = function(a, b) {
  return cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "+", "+", 1013904285), cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), function(a) {
      return cljs.core.apply.call(null, cljs.core.conj, cljs.core.truth_(a) ? a : cljs.core.List.EMPTY, f);
    });
  }, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a), b));
};
lt.objs.settings._behaviors = function(a, b) {
  return cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "+", "+", 1013904285), cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), function(a) {
      return cljs.core.remove.call(null, cljs.core.set.call(null, f), a);
    });
  }, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a), b), new cljs.core.Keyword(null, "-", "-", 1013904287), cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), function(a) {
      return cljs.core.apply.call(null, cljs.core.conj, cljs.core.truth_(a) ? a : cljs.core.List.EMPTY, f);
    });
  }, (new cljs.core.Keyword(null, "-", "-", 1013904287)).cljs$core$IFn$_invoke$arity$1(a), b));
};
lt.objs.settings.behavior_diff = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "+", "+", 1013904285)), e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "-", "-", 1013904287));
  return cljs.core.not.call(null, c) ? b : lt.objs.settings._behaviors.call(null, lt.objs.settings._PLUS_behaviors.call(null, b, d), e);
};
lt.objs.settings.reverse_diff = function(a) {
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "+", "+", 1013904285));
  b = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "-", "-", 1013904287));
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "+", "+", 1013904285), b, new cljs.core.Keyword(null, "-", "-", 1013904287), a], null);
};
lt.objs.settings.apply_diff = function(a) {
  a = lt.objs.settings.behavior_diff.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "+", "+", 1013904285), cljs.core.deref.call(null, lt.object.tags)], null));
  return cljs.core.reset_BANG_.call(null, lt.object.tags, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a));
};
lt.objs.settings.keyword__GT_str = function(a) {
  return a instanceof cljs.core.Keyword ? cljs.core.subs.call(null, "" + cljs.core.str(a), 1) : a;
};
lt.objs.settings.flat_behaviors__GT_map = function(a) {
  var b = {}, c = {};
  a = cljs.core.seq.call(null, a);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), k = cljs.core.nth.call(null, g, 1, null), l = cljs.core._EQ_.call(null, lt.objs.settings.keyword__GT_str.call(null, k)[0], "-") ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.subs.call(null, lt.objs.settings.keyword__GT_str.call(null, k), 1)], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, lt.objs.settings.keyword__GT_str.call(null, 
      k)], null), k = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null), h = lt.objs.settings.keyword__GT_str.call(null, h);
      cljs.core.truth_(k[h]) || (k[h] = []);
      k[h].push(2 < cljs.core.count.call(null, g) ? cljs.core.conj.call(null, cljs.core.seq.call(null, cljs.core.subvec.call(null, g, 2)), cljs.core.keyword.call(null, l)) : cljs.core.keyword.call(null, l));
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (e = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, a), d = cljs.core.nth.call(null, e, 0, null), f = cljs.core.nth.call(null, e, 1, null), h = cljs.core._EQ_.call(null, lt.objs.settings.keyword__GT_str.call(null, f)[0], "-") ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.subs.call(null, lt.objs.settings.keyword__GT_str.call(null, 
        f), 1)], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, lt.objs.settings.keyword__GT_str.call(null, f)], null), f = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), d = lt.objs.settings.keyword__GT_str.call(null, d), cljs.core.truth_(f[d]) || (f[d] = []), f[d].push(2 < cljs.core.count.call(null, e) ? cljs.core.conj.call(null, cljs.core.seq.call(null, cljs.core.subvec.call(null, e, 2)), cljs.core.keyword.call(null, 
        h)) : cljs.core.keyword.call(null, h)), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "+", "+", 1013904285), cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0), new cljs.core.Keyword(null, "-", "-", 1013904287), cljs.core.js__GT_clj.call(null, c, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0)], null);
};
lt.objs.settings.map__GT_flat_behaviors = function(a) {
  for (var b = [], c = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      for (var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null), h = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [h], null), g = cljs.core.seq.call(null, g), k = null, l = 0, m = 0;;) {
        if (m < l) {
          var n = cljs.core._nth.call(null, k, m), n = cljs.core.coll_QMARK_.call(null, n) ? n : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [n], null);
          b.push(cljs.core.into.call(null, h, n));
          m += 1;
        } else {
          if (g = cljs.core.seq.call(null, g)) {
            cljs.core.chunked_seq_QMARK_.call(null, g) ? (l = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), k = l, l = cljs.core.count.call(null, l)) : (k = cljs.core.first.call(null, g), k = cljs.core.coll_QMARK_.call(null, k) ? k : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null), b.push(cljs.core.into.call(null, h, k)), g = cljs.core.next.call(null, g), k = null, l = 0), m = 0;
          } else {
            break;
          }
        }
      }
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
          e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e);
        } else {
          e = cljs.core.first.call(null, c);
          d = cljs.core.nth.call(null, e, 0, null);
          e = cljs.core.nth.call(null, e, 1, null);
          d = new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [d], null);
          e = cljs.core.seq.call(null, e);
          f = null;
          for (g = h = 0;;) {
            if (g < h) {
              k = cljs.core._nth.call(null, f, g), k = cljs.core.coll_QMARK_.call(null, k) ? k : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [k], null), b.push(cljs.core.into.call(null, d, k)), g += 1;
            } else {
              if (e = cljs.core.seq.call(null, e)) {
                cljs.core.chunked_seq_QMARK_.call(null, e) ? (h = cljs.core.chunk_first.call(null, e), e = cljs.core.chunk_rest.call(null, e), f = h, h = cljs.core.count.call(null, h)) : (f = cljs.core.first.call(null, e), f = cljs.core.coll_QMARK_.call(null, f) ? f : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [f], null), b.push(cljs.core.into.call(null, d, f)), e = cljs.core.next.call(null, e), f = null, h = 0), g = 0;
              } else {
                break;
              }
            }
          }
          c = cljs.core.next.call(null, c);
          d = null;
          e = 0;
        }
        f = 0;
      } else {
        break;
      }
    }
  }
  a = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "-", "-", 1013904287)).cljs$core$IFn$_invoke$arity$1(a));
  c = null;
  for (e = d = 0;;) {
    if (e < d) {
      h = cljs.core._nth.call(null, c, e);
      f = cljs.core.nth.call(null, h, 0, null);
      h = cljs.core.nth.call(null, h, 1, null);
      h = cljs.core.seq.call(null, h);
      g = null;
      for (l = k = 0;;) {
        if (l < k) {
          m = cljs.core._nth.call(null, g, l), m = cljs.core.coll_QMARK_.call(null, m) ? m : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [m], null), n = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f, cljs.core.keyword.call(null, [cljs.core.str("-"), cljs.core.str(lt.objs.settings.keyword__GT_str.call(null, cljs.core.first.call(null, m)))].join(""))], null), b.push(cljs.core.into.call(null, n, cljs.core.rest.call(null, m))), 
          l += 1;
        } else {
          if (h = cljs.core.seq.call(null, h)) {
            cljs.core.chunked_seq_QMARK_.call(null, h) ? (k = cljs.core.chunk_first.call(null, h), h = cljs.core.chunk_rest.call(null, h), g = k, k = cljs.core.count.call(null, k)) : (g = cljs.core.first.call(null, h), g = cljs.core.coll_QMARK_.call(null, g) ? g : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [g], null), k = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f, cljs.core.keyword.call(null, [cljs.core.str("-"), cljs.core.str(lt.objs.settings.keyword__GT_str.call(null, 
            cljs.core.first.call(null, g)))].join(""))], null), b.push(cljs.core.into.call(null, k, cljs.core.rest.call(null, g))), h = cljs.core.next.call(null, h), g = null, k = 0), l = 0;
          } else {
            break;
          }
        }
      }
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
          d = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), c = d, d = cljs.core.count.call(null, d);
        } else {
          d = cljs.core.first.call(null, a);
          c = cljs.core.nth.call(null, d, 0, null);
          d = cljs.core.nth.call(null, d, 1, null);
          d = cljs.core.seq.call(null, d);
          e = null;
          for (h = f = 0;;) {
            if (h < f) {
              g = cljs.core._nth.call(null, e, h), g = cljs.core.coll_QMARK_.call(null, g) ? g : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [g], null), k = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.keyword.call(null, [cljs.core.str("-"), cljs.core.str(lt.objs.settings.keyword__GT_str.call(null, cljs.core.first.call(null, g)))].join(""))], null), b.push(cljs.core.into.call(null, k, cljs.core.rest.call(null, 
              g))), h += 1;
            } else {
              if (d = cljs.core.seq.call(null, d)) {
                cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (e = cljs.core.first.call(null, d), e = cljs.core.coll_QMARK_.call(null, e) ? e : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), f = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.keyword.call(null, [cljs.core.str("-"), 
                cljs.core.str(lt.objs.settings.keyword__GT_str.call(null, cljs.core.first.call(null, e)))].join(""))], null), b.push(cljs.core.into.call(null, f, cljs.core.rest.call(null, e))), d = cljs.core.next.call(null, d), e = null, f = 0), h = 0;
              } else {
                break;
              }
            }
          }
          a = cljs.core.next.call(null, a);
          c = null;
          d = 0;
        }
        e = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.vec.call(null, cljs.core.sort_by.call(null, cljs.core.first, cljs.core.js__GT_clj.call(null, b)));
};
lt.objs.settings.parse_behaviors = function(a, b) {
  return cljs.core.map_QMARK_.call(null, a) ? a : cljs.core.vector_QMARK_.call(null, a) ? lt.objs.settings.flat_behaviors__GT_map.call(null, a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.console.error.call(null, [cljs.core.str("Invalid behaviors file: "), cljs.core.str(b), cljs.core.str(". Behaviors must be either a vector or a map.")].join("")) : null;
};
lt.objs.settings.parse_file = function(a) {
  return lt.objs.settings.parse_behaviors.call(null, lt.objs.settings.safe_read.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, a)), a), a);
};
lt.objs.settings.pprint_flat_behaviors = function(a) {
  return[cljs.core.str((new cljs.core.Keyword(null, "str", "str", 1014018467)).cljs$core$IFn$_invoke$arity$1(cljs.core.reduce.call(null, function(a, c) {
    var d = cljs.core.first.call(null, c);
    return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "str", "str", 1014018467), [cljs.core.str((new cljs.core.Keyword(null, "str", "str", 1014018467)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str(cljs.core._EQ_.call(null, d, (new cljs.core.Keyword(null, "tag", "tag", 1014018828)).cljs$core$IFn$_invoke$arity$1(a)) ? null : "\n"), cljs.core.str("\n "), cljs.core.str(cljs.core.pr_str.call(null, c))].join(""), new cljs.core.Keyword(null, "tag", "tag", 1014018828), d], 
    null);
  }, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), cljs.core.first.call(null, cljs.core.first.call(null, a)), new cljs.core.Keyword(null, "str", "str", 1014018467), "["], null), a))), cljs.core.str("\n]")].join("");
};
lt.objs.settings.behavior_diffs_in = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? cljs.core.mapv.call(null, lt.objs.settings.parse_file, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "behaviors");
  }, lt.objs.files.full_path_ls.call(null, a))) : null;
};
lt.objs.settings.load_all = function() {
  var a = cljs.core.reduce.call(null, function(a, b) {
    return lt.objs.settings.behavior_diff.call(null, b, a);
  }, cljs.core.PersistentArrayMap.EMPTY, cljs.core.concat.call(null, lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "behaviors.diffs.default+", "behaviors.diffs.default+", 556712841), cljs.core.PersistentVector.EMPTY), lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "behaviors.diffs.plugin+", "behaviors.diffs.plugin+", 2303858461), cljs.core.PersistentVector.EMPTY), lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, 
  "behaviors.diffs.user+", "behaviors.diffs.user+", 707208773), cljs.core.PersistentVector.EMPTY))), b = (new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), c = cljs.core.truth_(cljs.core.truth_(b) ? !cljs.core.empty_QMARK_.call(null, b) : b) ? lt.objs.settings.behavior_diff.call(null, lt.objs.settings.parse_behaviors.call(null, lt.objs.settings.safe_read.call(null, b, "workspace.behaviors"), 
  "workspace.behaviors"), a) : a;
  cljs.core.reset_BANG_.call(null, lt.object.negated_tags, function() {
    var a = (new cljs.core.Keyword(null, "-", "-", 1013904287)).cljs$core$IFn$_invoke$arity$1(c);
    return cljs.core.truth_(a) ? a : cljs.core.PersistentArrayMap.EMPTY;
  }());
  return cljs.core.reset_BANG_.call(null, lt.object.tags, function() {
    var a = (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(c);
    return cljs.core.truth_(a) ? a : cljs.core.PersistentArrayMap.EMPTY;
  }());
};
lt.objs.settings.refresh_all = function refresh_all(b) {
  if (cljs.core.not.call(null, cljs.core.seq.call(null, b))) {
    return lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "behaviors.refreshed", "behaviors.refreshed", 1338765023)), lt.objs.notifos.done_working.call(null, "Behaviors loaded");
  }
  try {
    lt.object.refresh_BANG_.call(null, cljs.core.first.call(null, b));
  } catch (c) {
    lt.objs.console.error.call(null, c);
  }
  return process.nextTick(function() {
    return refresh_all.call(null, cljs.core.next.call(null, b));
  });
};
lt.objs.settings.refresh_diffed = function(a) {
  return lt.objs.settings.refresh_all.call(null, cljs.core.mapcat.call(null, lt.object.by_tag, cljs.core.concat.call(null, cljs.core.keys.call(null, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.keys.call(null, (new cljs.core.Keyword(null, "-", "-", 1013904287)).cljs$core$IFn$_invoke$arity$1(a)))));
};
lt.objs.settings.__GT_ordered_keystr = function(a) {
  var b = cljs.core._EQ_.call(null, cljs.core.last.call(null, a), "-") ? "-" : cljs.core.last.call(null, clojure.string.split.call(null, a, "-"));
  return[cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, a, "ctrl") ? "ctrl-" : null), cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, a, "cmd") ? "cmd-" : null), cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, a, "meta") ? "meta-" : null), cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, a, "altgr") ? "altgr-" : null), cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, a, "alt") ? "alt-" : null), cljs.core.str(lt.util.cljs.str_contains_QMARK_.call(null, 
  a, "shift") ? "shift-" : null), cljs.core.str(b)].join("");
};
lt.objs.settings.fix_key = function(a) {
  a = clojure.string.replace.call(null, a, "pmeta", lt.objs.keyboard.meta);
  a = clojure.string.split.call(null, a, " ");
  return cljs.core.reduce.call(null, function(a, c) {
    return[cljs.core.str(a), cljs.core.str(" "), cljs.core.str(c)].join("");
  }, cljs.core.map.call(null, lt.objs.settings.__GT_ordered_keystr, a));
};
lt.objs.settings.fix_key_entry = function(a) {
  var b = cljs.core.nth.call(null, a, 0, null);
  a = cljs.core.nth.call(null, a, 1, null);
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.settings.fix_key.call(null, b), a], null);
};
lt.objs.settings._PLUS_keys = function(a, b) {
  return cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), function(a) {
      return cljs.core.into.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, lt.objs.settings.fix_key_entry, f));
    });
  }, a, b);
};
lt.objs.settings._keys = function(a, b) {
  return cljs.core.reduce.call(null, function(a, b) {
    var e = cljs.core.nth.call(null, b, 0, null), f = cljs.core.nth.call(null, b, 1, null);
    return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), function(a) {
      return cljs.core.apply.call(null, cljs.core.dissoc, a, cljs.core.map.call(null, lt.objs.settings.fix_key, cljs.core.map_QMARK_.call(null, f) ? cljs.core.keys.call(null, f) : f));
    });
  }, a, b);
};
lt.objs.settings.key_diff = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "+", "+", 1013904285)), c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "-", "-", 1013904287));
  return lt.objs.settings._PLUS_keys.call(null, lt.objs.settings._keys.call(null, b, c), d);
};
lt.objs.settings.load_all_keys = function() {
  var a = cljs.core.reduce.call(null, function(a, c) {
    return lt.objs.settings.key_diff.call(null, c, a);
  }, cljs.core.PersistentArrayMap.EMPTY, cljs.core.concat.call(null, lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "keymap.diffs.default+", "keymap.diffs.default+", 711992781), cljs.core.PersistentVector.EMPTY), lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "keymap.diffs.plugin+", "keymap.diffs.plugin+", 4109982809), cljs.core.PersistentVector.EMPTY), lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "keymap.diffs.user+", 
  "keymap.diffs.user+", 1410763393), cljs.core.PersistentVector.EMPTY)));
  return cljs.core.reset_BANG_.call(null, lt.objs.keyboard.keys, a);
};
lt.objs.settings.__BEH__default_behavior_diffs = function(a, b) {
  return cljs.core.concat.call(null, b, lt.objs.settings.behavior_diffs_in.call(null, lt.objs.files.lt_home.call(null, "settings/default/")));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "default-behavior-diffs", "lt.objs.settings/default-behavior-diffs", 3478385645), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__default_behavior_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "behaviors.diffs.default+", "behaviors.diffs.default+", 
556712841), null], null), null));
lt.objs.settings.user_plugin_dir = lt.objs.files.lt_user_dir.call(null, "User");
lt.objs.settings.__BEH__user_behavior_diffs = function(a, b) {
  return cljs.core.concat.call(null, b, lt.objs.settings.behavior_diffs_in.call(null, lt.objs.settings.user_plugin_dir));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "user-behavior-diffs", "lt.objs.settings/user-behavior-diffs", 2390870839), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__user_behavior_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "behaviors.diffs.user+", "behaviors.diffs.user+", 707208773), null], 
null), null));
lt.objs.settings.__BEH__initial_behaviors = function(a) {
  cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.settings.user_plugin_dir)) || lt.objs.files.mkdir.call(null, lt.objs.settings.user_plugin_dir);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "pre-load", "pre-load", 3967767874));
  lt.objs.settings.load_all.call(null);
  a = cljs.core.seq.call(null, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances)));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.object.refresh_BANG_.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (a = cljs.core.first.call(null, b), lt.object.refresh_BANG_.call(null, a), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        break;
      }
    }
  }
  lt.objs.settings.load_all_keys.call(null);
  return lt.objs.keyboard.refresh.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "initial-behaviors", "lt.objs.settings/initial-behaviors", 1554007604), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__initial_behaviors, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pre-init", "pre-init", 3967677804), null], null), null));
lt.objs.settings.__BEH__load_behaviors = function(a) {
  lt.objs.notifos.working.call(null, "loading behaviors...");
  lt.objs.settings.load_all.call(null);
  return lt.objs.settings.refresh_all.call(null, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.instances)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "load-behaviors", "lt.objs.settings/load-behaviors", 1077508690), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__load_behaviors, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600), null], null), null));
lt.objs.settings.__BEH__eval_settings = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save", "save", 1017427183));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "eval-settings", "lt.objs.settings/eval-settings", 3832502360), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__eval_settings, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "eval.one", "eval.one", 1173589382), null, new cljs.core.Keyword(null, "eval", "eval", 
1017029646), null], null), null));
lt.objs.settings.__BEH__grab_workspace_behaviors = function(a, b) {
  var c = (new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)).cljs$core$IFn$_invoke$arity$1(b), c = cljs.core.empty_QMARK_.call(null, c) ? null : lt.objs.settings.parse_behaviors.call(null, cljs.reader.read_string.call(null, c), "workspace.behaviors"), d = (new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = cljs.core.empty_QMARK_.call(null, d) ? null : lt.objs.settings.parse_behaviors.call(null, 
  cljs.reader.read_string.call(null, d), "workspace.behaviors");
  cljs.core.truth_(c) && (lt.objs.settings.apply_diff.call(null, lt.objs.settings.reverse_diff.call(null, c)), lt.objs.settings.refresh_diffed.call(null, c));
  return cljs.core.truth_(d) ? (lt.objs.settings.apply_diff.call(null, d), lt.objs.settings.refresh_diffed.call(null, d)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "grab-workspace-behaviors", "lt.objs.settings/grab-workspace-behaviors", 3638576708), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__grab_workspace_behaviors, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set", "set", 1014018004), null], null), null));
lt.objs.settings.__BEH__workspace_save = function(a) {
  var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "info", "info", 1017141280)), b = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b;
  cljs.core.get.call(null, b, new cljs.core.Keyword(null, "path", "path", 1017337751));
  b = lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "save+", "save+", 1123115456), lt.objs.editor.__GT_val.call(null, a));
  lt.object.merge_BANG_.call(null, lt.objs.workspace.current_ws, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978), b], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !1], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "saved", "saved", 1123115513));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clean", "clean", 1108650427));
  return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "serialize!", "serialize!", 4710885555));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "workspace-save", "lt.objs.settings/workspace-save", 3431155415), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__workspace_save, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save", "save", 1017427183), null], null), null));
lt.objs.settings.user_behaviors_path = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, "user.behaviors");
lt.objs.settings.user_keymap_path = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, "user.keymap");
lt.objs.settings.user_cljs_path = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, "src", "lt", "plugins", "user.cljs");
lt.objs.settings.user_plugin_paths = new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, "user.behaviors user.keymap src project.clj plugin.edn user_compiled.js".split(" "), null);
lt.objs.settings.__BEH__create_user_plugin = function(a) {
  a = cljs.core.seq.call(null, lt.objs.settings.user_plugin_paths);
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d), f = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, e);
      cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, f)) || (cljs.core.truth_(function() {
        var a = cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["user.keymap", null, "user.behaviors", null], null), null), e);
        return a ? lt.objs.files.exists_QMARK_.call(null, lt.objs.files.lt_user_dir.call(null, [cljs.core.str("/settings/"), cljs.core.str(e)].join(""))) : a;
      }()) ? lt.objs.files.copy.call(null, lt.objs.files.lt_user_dir.call(null, [cljs.core.str("/settings/"), cljs.core.str(e)].join("")), f) : lt.objs.files.copy.call(null, lt.objs.files.lt_home.call(null, lt.objs.files.join.call(null, "core", "User", e)), f));
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (e = cljs.core.first.call(null, b), a = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, e), cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) || (cljs.core.truth_(function() {
          var a = cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["user.keymap", null, "user.behaviors", null], null), null), e);
          return a ? lt.objs.files.exists_QMARK_.call(null, lt.objs.files.lt_user_dir.call(null, [cljs.core.str("/settings/"), cljs.core.str(e)].join(""))) : a;
        }()) ? lt.objs.files.copy.call(null, lt.objs.files.lt_user_dir.call(null, [cljs.core.str("/settings/"), cljs.core.str(e)].join("")), a) : lt.objs.files.copy.call(null, lt.objs.files.lt_home.call(null, lt.objs.files.join.call(null, "core", "User", e)), a)), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "create-user-plugin", "lt.objs.settings/create-user-plugin", 4382856776), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__create_user_plugin, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "create-user-plugin", "create-user-plugin", 2686594966), null], null), 
null));
lt.objs.settings.convert_file = function(a) {
  var b = lt.objs.settings.safe_read.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, a)), a);
  if (cljs.core.map_QMARK_.call(null, b)) {
    var c = [cljs.core.str(a), cljs.core.str(".bak")].join("");
    lt.objs.files.copy.call(null, a, c);
    var d;
    d = lt.objs.files.ext.call(null, a);
    d = cljs.core._EQ_.call(null, "behaviors", d) ? lt.objs.settings.map__GT_flat_behaviors : cljs.core._EQ_.call(null, "keymap", d) ? lt.objs.settings.map__GT_flat_keymap : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.identity : null;
    b = [cljs.core.str(";; Your file has been converted to the new flat format.\n"), cljs.core.str(";; Conversion does not preserve comments or indentation.\n"), cljs.core.str(";; File is backed up at "), cljs.core.str(c), cljs.core.str("\n"), cljs.core.str(lt.objs.settings.pprint_flat_behaviors.call(null, d.call(null, b)))].join("");
    return lt.objs.files.save.call(null, a, b);
  }
  return null;
};
lt.objs.settings.__BEH__flatten_map_settings = function(a) {
  a = cljs.core.seq.call(null, cljs.core.filter.call(null, function(a) {
    return cljs.core.contains_QMARK_.call(null, new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, ["behaviors", null, "keymap", null], null), null), lt.objs.files.ext.call(null, a));
  }, lt.objs.files.full_path_ls.call(null, lt.objs.settings.user_plugin_dir)));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.objs.settings.convert_file.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.objs.settings.convert_file.call(null, e), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "flatten-map-settings", "lt.objs.settings/flatten-map-settings", 824167599), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__flatten_map_settings, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "flatten-map-settings", "flatten-map-settings", 3992976911), 
null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Reload behaviors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, cljs.core.first.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043))), new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "keymaps.reload", "keymaps.reload", 666881155), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Reload keymaps", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.objs.settings.load_all_keys.call(null);
  lt.objs.keyboard.refresh.call(null);
  lt.object.raise.call(null, cljs.core.first.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043))), new cljs.core.Keyword(null, "app.keys.load", "app.keys.load", 3209213061));
  return lt.objs.notifos.set_msg_BANG_.call(null, "keys loaded");
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "behaviors.modify-user", "behaviors.modify-user", 4216959587), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: User behaviors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), lt.objs.settings.user_behaviors_path);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "behaviors.view-default", "behaviors.view-default", 4722027256), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: Default behaviors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), lt.objs.files.lt_home.call(null, "/settings/default/default.behaviors"));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "behaviors.modify-workspace", "behaviors.modify-workspace", 1192694945), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: Workspace behaviors", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "opener.open-info", "opener.open-info", 2298471692), new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "mime", "mime", 1017255846), "text/x-clojure", new cljs.core.Keyword(null, "name", "name", 1017277949), "workspace.behaviors", new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.behaviors", 
  "editor.behaviors", 2095045778), new cljs.core.Keyword(null, "editor.behaviors.workspace", "editor.behaviors.workspace", 2607887545)], null), new cljs.core.Keyword(null, "content", "content", 1965434859), (new cljs.core.Keyword(null, "ws-behaviors", "ws-behaviors", 2339346978)).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null, lt.objs.workspace.current_ws), "")], null));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "keymap.modify-user", "keymap.modify-user", 625546911), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: User keymap", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), lt.objs.settings.user_keymap_path);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "keymap.view-default", "keymap.view-default", 762416700), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: Default keymap", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), lt.objs.files.lt_home.call(null, "/settings/default/default.keymap"));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "user.modify-user", "user.modify-user", 581252813), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: User script", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), lt.objs.settings.user_cljs_path);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "user.add-user-plugin-to-workspace", "user.add-user-plugin-to-workspace", 4324437372), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: Add User plugin to workspace", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), lt.objs.settings.user_plugin_dir);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "convert-to-flat-format", "convert-to-flat-format", 1205600069), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Settings: Convert current file to flat format", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.settings.convert_file.call(null, cljs.core.get_in.call(null, cljs.core.deref.call(null, lt.objs.editor.pool.last_active.call(null)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "path", "path", 1017337751)], null)));
}], null));
lt.objs.settings.__BEH__on_close_remove = function(a) {
  return lt.objs.tabs.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "on-close-remove", "lt.objs.settings/on-close-remove", 4619688773), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__on_close_remove, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.settings.flat_keymap__GT_map = function(a) {
  var b = {}, c = {};
  a = cljs.core.seq.call(null, a);
  for (var d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), k = cljs.core.nth.call(null, g, 1, null), l = cljs.core._EQ_.call(null, lt.objs.settings.keyword__GT_str.call(null, k)[0], "-") && 1 < cljs.core.count.call(null, lt.objs.settings.keyword__GT_str.call(null, k)) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.subs.call(null, lt.objs.settings.keyword__GT_str.call(null, k), 1)], null) : new cljs.core.PersistentVector(null, 
      2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, lt.objs.settings.keyword__GT_str.call(null, k)], null), k = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null), m = k === c, h = lt.objs.settings.keyword__GT_str.call(null, h);
      cljs.core.truth_(k[h]) || (k[h] = m ? [] : {});
      m ? k[h].push(l) : k[h][l] = cljs.core.subvec.call(null, g, 2);
      f += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (e = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, a), d = cljs.core.nth.call(null, e, 0, null), f = cljs.core.nth.call(null, e, 1, null), h = cljs.core._EQ_.call(null, lt.objs.settings.keyword__GT_str.call(null, f)[0], "-") && 1 < cljs.core.count.call(null, lt.objs.settings.keyword__GT_str.call(null, f)) ? new cljs.core.PersistentVector(null, 
        2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, cljs.core.subs.call(null, lt.objs.settings.keyword__GT_str.call(null, f), 1)], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, lt.objs.settings.keyword__GT_str.call(null, f)], null), f = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null), g = f === c, d = lt.objs.settings.keyword__GT_str.call(null, d), cljs.core.truth_(f[d]) || (f[d] = g ? [] : {}), g ? f[d].push(h) : 
        f[d][h] = cljs.core.subvec.call(null, e, 2), a = cljs.core.next.call(null, a), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "+", "+", 1013904285), cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
    return function p(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, h), g], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), p.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            c = cljs.core.first.call(null, b);
            e = cljs.core.nth.call(null, c, 0, null);
            c = cljs.core.nth.call(null, c, 1, null);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, e), c], null), p.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.js__GT_clj.call(null, b));
  }()), new cljs.core.Keyword(null, "-", "-", 1013904287), cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
    return function p(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, h), g], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), p.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            c = cljs.core.first.call(null, b);
            e = cljs.core.nth.call(null, c, 0, null);
            c = cljs.core.nth.call(null, c, 1, null);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.keyword.call(null, e), c], null), p.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.js__GT_clj.call(null, c));
  }())], null);
};
lt.objs.settings.map__GT_flat_keymap = function(a) {
  for (var b = [], c = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "+", "+", 1013904285)).cljs$core$IFn$_invoke$arity$1(a)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      for (var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), k = cljs.core.nth.call(null, g, 1, null), l = cljs.core.seq.call(null, k), m = null, n = 0, p = 0;;) {
        if (p < n) {
          var q = cljs.core._nth.call(null, m, p), r = cljs.core.nth.call(null, q, 0, null), s = cljs.core.nth.call(null, q, 1, null), t = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [h, r], null);
          b.push(cljs.core.into.call(null, t, s));
          p += 1;
        } else {
          var v = cljs.core.seq.call(null, l);
          if (v) {
            var u = v;
            if (cljs.core.chunked_seq_QMARK_.call(null, u)) {
              var w = cljs.core.chunk_first.call(null, u), A = cljs.core.chunk_rest.call(null, u), J = w, Y = cljs.core.count.call(null, w), l = A, m = J, n = Y
            } else {
              var x = cljs.core.first.call(null, u), y = cljs.core.nth.call(null, x, 0, null), B = cljs.core.nth.call(null, x, 1, null), C = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [h, y], null);
              b.push(cljs.core.into.call(null, C, B));
              l = cljs.core.next.call(null, u);
              m = null;
              n = 0;
            }
            p = 0;
          } else {
            break;
          }
        }
      }
      f += 1;
    } else {
      var D = cljs.core.seq.call(null, c);
      if (D) {
        var z = D;
        if (cljs.core.chunked_seq_QMARK_.call(null, z)) {
          var F = cljs.core.chunk_first.call(null, z), E = cljs.core.chunk_rest.call(null, z), G = F, H = cljs.core.count.call(null, F), c = E, d = G, e = H
        } else {
          for (var I = cljs.core.first.call(null, z), K = cljs.core.nth.call(null, I, 0, null), M = cljs.core.nth.call(null, I, 1, null), L = cljs.core.seq.call(null, M), N = null, P = 0, O = 0;;) {
            if (O < P) {
              var Q = cljs.core._nth.call(null, N, O), Z = cljs.core.nth.call(null, Q, 0, null), $ = cljs.core.nth.call(null, Q, 1, null), Ga = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [K, Z], null);
              b.push(cljs.core.into.call(null, Ga, $));
              O += 1;
            } else {
              var la = cljs.core.seq.call(null, L);
              if (la) {
                var R = la;
                if (cljs.core.chunked_seq_QMARK_.call(null, R)) {
                  var ma = cljs.core.chunk_first.call(null, R), Ha = cljs.core.chunk_rest.call(null, R), Ia = ma, Ja = cljs.core.count.call(null, ma), L = Ha, N = Ia, P = Ja
                } else {
                  var na = cljs.core.first.call(null, R), Ka = cljs.core.nth.call(null, na, 0, null), La = cljs.core.nth.call(null, na, 1, null), Ma = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [K, Ka], null);
                  b.push(cljs.core.into.call(null, Ma, La));
                  L = cljs.core.next.call(null, R);
                  N = null;
                  P = 0;
                }
                O = 0;
              } else {
                break;
              }
            }
          }
          c = cljs.core.next.call(null, z);
          d = null;
          e = 0;
        }
        f = 0;
      } else {
        break;
      }
    }
  }
  for (var aa = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "-", "-", 1013904287)).cljs$core$IFn$_invoke$arity$1(a)), ba = null, ca = 0, S = 0;;) {
    if (S < ca) {
      for (var oa = cljs.core._nth.call(null, ba, S), pa = cljs.core.nth.call(null, oa, 0, null), da = cljs.core.nth.call(null, oa, 1, null), ea = cljs.core.seq.call(null, da), fa = null, ga = 0, T = 0;;) {
        if (T < ga) {
          var qa = cljs.core._nth.call(null, fa, T), ra = cljs.core.map_QMARK_.call(null, da) ? qa : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [qa, cljs.core.PersistentVector.EMPTY], null), Na = cljs.core.nth.call(null, ra, 0, null), Oa = cljs.core.nth.call(null, ra, 1, null), Pa = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [pa, [cljs.core.str("-"), cljs.core.str(Na)].join("")], null);
          b.push(cljs.core.into.call(null, Pa, Oa));
          T += 1;
        } else {
          var sa = cljs.core.seq.call(null, ea);
          if (sa) {
            var U = sa;
            if (cljs.core.chunked_seq_QMARK_.call(null, U)) {
              var ta = cljs.core.chunk_first.call(null, U), Qa = cljs.core.chunk_rest.call(null, U), Ra = ta, Sa = cljs.core.count.call(null, ta), ea = Qa, fa = Ra, ga = Sa
            } else {
              var ua = cljs.core.first.call(null, U), va = cljs.core.map_QMARK_.call(null, da) ? ua : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [ua, cljs.core.PersistentVector.EMPTY], null), Ta = cljs.core.nth.call(null, va, 0, null), Ua = cljs.core.nth.call(null, va, 1, null), Va = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [pa, [cljs.core.str("-"), cljs.core.str(Ta)].join("")], null);
              b.push(cljs.core.into.call(null, Va, Ua));
              ea = cljs.core.next.call(null, U);
              fa = null;
              ga = 0;
            }
            T = 0;
          } else {
            break;
          }
        }
      }
      S += 1;
    } else {
      var wa = cljs.core.seq.call(null, aa);
      if (wa) {
        var V = wa;
        if (cljs.core.chunked_seq_QMARK_.call(null, V)) {
          var xa = cljs.core.chunk_first.call(null, V), Wa = cljs.core.chunk_rest.call(null, V), Xa = xa, Ya = cljs.core.count.call(null, xa), aa = Wa, ba = Xa, ca = Ya
        } else {
          for (var ya = cljs.core.first.call(null, V), za = cljs.core.nth.call(null, ya, 0, null), ha = cljs.core.nth.call(null, ya, 1, null), ia = cljs.core.seq.call(null, ha), ja = null, ka = 0, W = 0;;) {
            if (W < ka) {
              var Aa = cljs.core._nth.call(null, ja, W), Ba = cljs.core.map_QMARK_.call(null, ha) ? Aa : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [Aa, cljs.core.PersistentVector.EMPTY], null), Za = cljs.core.nth.call(null, Ba, 0, null), $a = cljs.core.nth.call(null, Ba, 1, null), ab = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [za, [cljs.core.str("-"), cljs.core.str(Za)].join("")], null);
              b.push(cljs.core.into.call(null, ab, $a));
              W += 1;
            } else {
              var Ca = cljs.core.seq.call(null, ia);
              if (Ca) {
                var X = Ca;
                if (cljs.core.chunked_seq_QMARK_.call(null, X)) {
                  var Da = cljs.core.chunk_first.call(null, X), bb = cljs.core.chunk_rest.call(null, X), cb = Da, db = cljs.core.count.call(null, Da), ia = bb, ja = cb, ka = db
                } else {
                  var Ea = cljs.core.first.call(null, X), Fa = cljs.core.map_QMARK_.call(null, ha) ? Ea : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [Ea, cljs.core.PersistentVector.EMPTY], null), eb = cljs.core.nth.call(null, Fa, 0, null), fb = cljs.core.nth.call(null, Fa, 1, null), gb = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [za, [cljs.core.str("-"), cljs.core.str(eb)].join("")], null);
                  b.push(cljs.core.into.call(null, gb, fb));
                  ia = cljs.core.next.call(null, X);
                  ja = null;
                  ka = 0;
                }
                W = 0;
              } else {
                break;
              }
            }
          }
          aa = cljs.core.next.call(null, V);
          ba = null;
          ca = 0;
        }
        S = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.vec.call(null, cljs.core.sort_by.call(null, cljs.core.first, cljs.core.js__GT_clj.call(null, b)));
};
lt.objs.settings.parse_key_file = function(a) {
  var b = lt.objs.settings.safe_read.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, a)), a);
  return cljs.core.map_QMARK_.call(null, b) ? b : cljs.core.vector_QMARK_.call(null, b) ? lt.objs.settings.flat_keymap__GT_map.call(null, b) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.console.error.call(null, [cljs.core.str("Invalid keymap file: "), cljs.core.str(a), cljs.core.str(". Keymaps must be either a vector or a map.")].join("")) : null;
};
lt.objs.settings.keymap_diffs_in = function(a) {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, a)) ? cljs.core.map.call(null, lt.objs.settings.parse_key_file, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, lt.objs.files.ext.call(null, a), "keymap");
  }, lt.objs.files.full_path_ls.call(null, a))) : null;
};
lt.objs.settings.__BEH__default_keymap_diffs = function(a, b) {
  return cljs.core.concat.call(null, b, lt.objs.settings.keymap_diffs_in.call(null, lt.objs.files.lt_home.call(null, "/settings/default/")));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "default-keymap-diffs", "lt.objs.settings/default-keymap-diffs", 3391340802), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__default_keymap_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "keymap.diffs.default+", "keymap.diffs.default+", 711992781), 
null], null), null));
lt.objs.settings.__BEH__user_keymap_diffs = function(a, b) {
  return cljs.core.concat.call(null, b, lt.objs.settings.keymap_diffs_in.call(null, lt.objs.settings.user_plugin_dir));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "user-keymap-diffs", "lt.objs.settings/user-keymap-diffs", 3926753964), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__user_keymap_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "keymap.diffs.user+", "keymap.diffs.user+", 1410763393), null], null), 
null));
lt.objs.settings.pair_keybindings = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330), new cljs.core.PersistentArrayMap(null, 7, ['"', new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.repeat-pair", "editor.repeat-pair", 1820110909), '"')], null), "(", new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, 
"editor.open-pair", "editor.open-pair", 4001431726), "(")], null), ")", new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.close-pair", "editor.close-pair", 2068601890), ")")], null), "[", new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.open-pair", "editor.open-pair", 4001431726), "[")], null), "{", new cljs.core.PersistentVector(null, 
1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.open-pair", "editor.open-pair", 4001431726), "{")], null), "]", new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.close-pair", "editor.close-pair", 2068601890), "]")], null), "}", new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.list(new cljs.core.Keyword(null, "editor.close-pair", 
"editor.close-pair", 2068601890), "}")], null)], null)], null);
lt.objs.settings.__BEH__pair_keymap_diffs = function(a, b) {
  lt.objs.console.error.call(null, [cljs.core.str("[:app "), cljs.core.str(new cljs.core.Keyword("lt.objs.settings", "pair-keymap-diffs", "lt.objs.settings/pair-keymap-diffs", 3790818555)), cljs.core.str("] is deprecated and will be removed in 0.9.0. Use [:editor :lt.objs.editor/autoclose-brackets] instead")].join(""));
  return cljs.core.concat.call(null, b, cljs.core._conj.call(null, cljs.core.List.EMPTY, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "+", "+", 1013904285), lt.objs.settings.pair_keybindings], null)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "pair-keymap-diffs", "lt.objs.settings/pair-keymap-diffs", 3790818555), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__pair_keymap_diffs, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: auto-close parens/brackets/quotes/pairs", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "keymap.diffs.user+", "keymap.diffs.user+", 1410763393), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.settings.__BEH__on_behaviors_editor_save = function(a) {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "on-behaviors-editor-save", "lt.objs.settings/on-behaviors-editor-save", 3927833097), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__on_behaviors_editor_save, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "saved", "saved", 1123115513), null], null), null));
lt.objs.settings.__BEH__on_keymap_editor_save = function(a) {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "keymaps.reload", "keymaps.reload", 666881155));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.settings", "on-keymap-editor-save", "lt.objs.settings/on-keymap-editor-save", 1834857841), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.settings.__BEH__on_keymap_editor_save, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "saved", "saved", 1123115513), null], null), null));
lt.object.tag_behaviors.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043), new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.settings", "initial-behaviors", "lt.objs.settings/initial-behaviors", 1554007604), new cljs.core.Keyword("lt.objs.settings", "create-user-plugin", "lt.objs.settings/create-user-plugin", 4382856776), new cljs.core.Keyword("lt.objs.settings", "flatten-map-settings", "lt.objs.settings/flatten-map-settings", 
824167599), new cljs.core.Keyword("lt.objs.settings", "load-behaviors", "lt.objs.settings/load-behaviors", 1077508690), new cljs.core.Keyword("lt.objs.settings", "default-behavior-diffs", "lt.objs.settings/default-behavior-diffs", 3478385645), new cljs.core.Keyword("lt.objs.settings", "user-behavior-diffs", "lt.objs.settings/user-behavior-diffs", 2390870839), new cljs.core.Keyword("lt.objs.settings", "default-keymap-diffs", "lt.objs.settings/default-keymap-diffs", 3391340802), new cljs.core.Keyword("lt.objs.settings", 
"user-keymap-diffs", "lt.objs.settings/user-keymap-diffs", 3926753964)], null));
lt.util.kahn = {};
lt.util.kahn.without = function(a, b) {
  return clojure.set.difference.call(null, a, cljs.core.PersistentHashSet.fromArray([b], !0));
};
lt.util.kahn.take_1 = function(a) {
  if (cljs.core.empty_QMARK_.call(null, a)) {
    throw Error([cljs.core.str("Assert failed: "), cljs.core.str(cljs.core.pr_str.call(null, cljs.core.list(new cljs.core.Symbol(null, "not", "not", -1640422260, null), cljs.core.list(new cljs.core.Symbol(null, "empty?", "empty?", 1355128395, null), new cljs.core.Symbol(null, "s", "s", -1640531412, null)))))].join(""));
  }
  var b = cljs.core.first.call(null, a);
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, lt.util.kahn.without.call(null, a, b)], null);
};
lt.util.kahn.no_incoming = function(a) {
  var b = cljs.core.set.call(null, cljs.core.keys.call(null, a));
  a = cljs.core.apply.call(null, clojure.set.union, cljs.core.vals.call(null, a));
  return clojure.set.difference.call(null, b, a);
};
lt.util.kahn.normalize = function(a) {
  var b = cljs.core.apply.call(null, clojure.set.union, cljs.core.vals.call(null, a));
  return cljs.core.reduce.call(null, function(a, b) {
    return cljs.core.truth_(cljs.core.get.call(null, a, b)) ? a : cljs.core.assoc.call(null, a, b, cljs.core.PersistentHashSet.EMPTY);
  }, a, b);
};
lt.util.kahn.kahn_sort = function() {
  var a = null, b = function(b) {
    return a.call(null, lt.util.kahn.normalize.call(null, b), cljs.core.PersistentVector.EMPTY, lt.util.kahn.no_incoming.call(null, b));
  }, c = function(a, b, c) {
    for (;;) {
      if (cljs.core.empty_QMARK_.call(null, c)) {
        return cljs.core.every_QMARK_.call(null, cljs.core.empty_QMARK_, cljs.core.vals.call(null, a)) ? b : null;
      }
      var g = lt.util.kahn.take_1.call(null, c), h = cljs.core.nth.call(null, g, 0, null), k = cljs.core.nth.call(null, g, 1, null), l = a.call(null, h);
      a = c = cljs.core.reduce.call(null, function(a, b, c, d, e, f, g) {
        return function(a, b) {
          return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [e], null), lt.util.kahn.without, b);
        };
      }(a, b, c, g, h, k, l), a, l);
      b = cljs.core.conj.call(null, b, h);
      c = k = clojure.set.union.call(null, k, clojure.set.intersection.call(null, lt.util.kahn.no_incoming.call(null, c), l));
    }
  }, a = function(a, e, f) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 3:
        return c.call(this, a, e, f);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$3 = c;
  return a;
}();
lt.objs.clients = {};
lt.objs.clients.cs = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.clients.__GT_id = function(a) {
  return lt.object.__GT_id.call(null, a);
};
lt.objs.clients.client_BANG_ = function(a) {
  var b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients", "client", "lt.objs.clients/client", 613325584));
  lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null));
  cljs.core.swap_BANG_.call(null, lt.objs.clients.cs, cljs.core.assoc, lt.objs.clients.__GT_id.call(null, b), b);
  return b;
};
lt.objs.clients.by_id = function(a) {
  return cljs.core.truth_(a) ? cljs.core.deref.call(null, lt.objs.clients.cs).call(null, a) : null;
};
lt.objs.clients.by_name = function(a) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return cljs.core._EQ_.call(null, a, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.objs.clients.cs))));
};
lt.objs.clients.__GT_name = function(a) {
  return cljs.core.map_QMARK_.call(null, a) ? (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a) : a;
};
lt.objs.clients.merge_info = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "tags", "tags", 1017456523));
  cljs.core.get.call(null, c, new cljs.core.Keyword(null, "type", "type", 1017479852));
  var c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "commands", "commands", 4706336250)), e = cljs.core.dissoc.call(null, b, new cljs.core.Keyword(null, "tags", "tags", 1017456523));
  lt.object.merge_BANG_.call(null, a, cljs.core.merge.call(null, e, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "commands", "commands", 4706336250), cljs.core.set.call(null, cljs.core.map.call(null, cljs.core.keyword, c))], null)));
  return cljs.core.truth_(d) ? lt.object.add_tags.call(null, a, d) : null;
};
lt.objs.clients.handle_connection_BANG_ = function handle_connection_BANG_(b) {
  var c = lt.objs.clients.by_id.call(null, (new cljs.core.Keyword(null, "client-id", "client-id", 3404733903)).cljs$core$IFn$_invoke$arity$1(b));
  if (cljs.core.truth_(c)) {
    return lt.objs.clients.merge_info.call(null, c, b), lt.object.raise.call(null, c, new cljs.core.Keyword(null, "connect", "connect", 1965255772)), lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "connect", "connect", 1965255772), c), c;
  }
  c = lt.objs.clients.client_BANG_.call(null, (new cljs.core.Keyword(null, "tag", "tag", 1014018828)).cljs$core$IFn$_invoke$arity$1(b));
  return handle_connection_BANG_.call(null, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "client-id", "client-id", 3404733903), lt.objs.clients.__GT_id.call(null, c)));
};
lt.objs.clients.rem_BANG_ = function(a) {
  var b = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.swap_BANG_.call(null, lt.objs.clients.cs, cljs.core.dissoc, lt.objs.clients.__GT_id.call(null, a));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "disconnect", "disconnect", 1544309774));
  lt.object.destroy_BANG_.call(null, a);
  return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "disconnect", "disconnect", 1544309774), b);
};
lt.objs.clients.available_QMARK_ = function(a) {
  return lt.objs.clients.by_id.call(null, lt.objs.clients.__GT_id.call(null, a));
};
lt.objs.clients.cb_gc_timeout = 36E5;
lt.objs.clients.callbacks = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.clients.cb_id = cljs.core.atom.call(null, -1);
lt.objs.clients.__GT_cb = function(a, b) {
  return cljs.core.truth_(cljs.core.truth_(a) ? b : a) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b], null) : cljs.core.truth_(a) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [null, a], null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b], null) : null;
};
lt.objs.clients.store_cb = function(a, b) {
  return cljs.core.swap_BANG_.call(null, lt.objs.clients.callbacks, cljs.core.assoc, b, a);
};
lt.objs.clients.rem_cb = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.objs.clients.callbacks, function(b) {
    return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.remove.call(null, function(b) {
      cljs.core.nth.call(null, b, 0, null);
      b = cljs.core.nth.call(null, b, 1, null);
      cljs.core.nth.call(null, b, 0, null);
      b = cljs.core.nth.call(null, b, 1, null);
      return cljs.core._EQ_.call(null, b, a);
    }, b));
  });
};
lt.objs.clients.callback_QMARK_ = function(a) {
  return cljs.core.truth_(a) ? cljs.core.deref.call(null, lt.objs.clients.callbacks).call(null, a) : null;
};
lt.objs.clients.call = function(a, b, c) {
  var d = lt.objs.clients.callback_QMARK_.call(null, a);
  a = cljs.core.nth.call(null, d, 0, null);
  d = cljs.core.nth.call(null, d, 1, null);
  return cljs.core.truth_(d) ? (cljs.core.fn_QMARK_.call(null, d) ? d.call(null, b, c) : lt.object.raise.call(null, d, b, c), cljs.core.not.call(null, a) && !cljs.core.fn_QMARK_.call(null, d) ? lt.object.raise.call(null, lt.objs.clients.clients, b, c) : null) : null;
};
lt.objs.clients.cb__GT_obj = function(a) {
  a = lt.objs.clients.callback_QMARK_.call(null, a);
  cljs.core.nth.call(null, a, 0, null);
  a = cljs.core.nth.call(null, a, 1, null);
  return cljs.core.truth_(a) ? cljs.core.fn_QMARK_.call(null, a) ? null : a : null;
};
lt.objs.clients.__GT_message = function(a, b, c, d) {
  var e = cljs.core.not.call(null, d) ? lt.objs.clients.clients : d;
  d = cljs.core.fn_QMARK_.call(null, e) ? cljs.core.gensym.call(null, "client-cb") : null;
  e = lt.objs.clients.__GT_cb.call(null, c, e);
  cljs.core.nth.call(null, e, 0, null);
  c = cljs.core.nth.call(null, e, 1, null);
  cljs.core.truth_(c) && lt.objs.clients.store_cb.call(null, e, d);
  var e = cljs.core.PersistentArrayMap, f = new cljs.core.Keyword(null, "cb", "cb", 1013907409);
  d = cljs.core.truth_(d) ? d : lt.object.__GT_id.call(null, c);
  return new e(null, 3, [f, d, new cljs.core.Keyword(null, "command", "command", 1964298941), cljs.core.name.call(null, a), new cljs.core.Keyword(null, "data", "data", 1016980252), b], null);
};
lt.objs.clients.subpath_QMARK_ = function(a, b) {
  return cljs.core.truth_(a) ? cljs.core._EQ_.call(null, clojure.string.lower_case.call(null, b).indexOf(clojure.string.lower_case.call(null, a)), 0) : null;
};
lt.objs.clients.discover_STAR_ = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, g = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "path", "path", 1017337751)), c = cljs.core.filter.call(null, function(b) {
      b = (b ? b.cljs$lang$protocol_mask$partition0$ & 32768 || b.cljs$core$IDeref$ || (b.cljs$lang$protocol_mask$partition0$ ? 0 : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, b)) : cljs.core.native_satisfies_QMARK_.call(null, cljs.core.IDeref, b)) ? cljs.core.deref.call(null, b) : b;
      var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b;
      b = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "commands", "commands", 4706336250));
      c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "dir", "dir", 1014003711));
      c = cljs.core.truth_(cljs.core.truth_(g) ? c : g) ? lt.objs.clients.subpath_QMARK_.call(null, c, g) : !0;
      return cljs.core.truth_(c) ? cljs.core.get.call(null, b, a) : c;
    }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.objs.clients.cs))), h = cljs.core.filter.call(null, function(a) {
      return function(a) {
        return cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "dir", "dir", 1014003711));
      };
    }(c), c);
    return cljs.core.truth_(cljs.core.truth_(g) ? cljs.core.seq.call(null, h) : g) ? h : c;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.clients.discover = function(a, b) {
  var c = lt.objs.clients.discover_STAR_.call(null, a, b), d = cljs.core.nth.call(null, c, 0, null), e = cljs.core.nthnext.call(null, c, 1);
  return cljs.core.not.call(null, d) ? new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "none", "none", 1017291434)], null) : cljs.core.truth_(cljs.core.truth_(d) ? cljs.core.not.call(null, cljs.core.seq.call(null, e)) : d) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "found", "found", 1111526132), d], null) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "select", "select", 4402849902), c], null) : null;
};
lt.objs.clients.send = function() {
  var a = function(a, b, e) {
    var f = cljs.core.nth.call(null, e, 0, null), g = cljs.core.nth.call(null, e, 1, null);
    e = cljs.core.nth.call(null, e, 2, null);
    b = lt.objs.clients.__GT_message.call(null, b, f, g, e);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), b);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.clients.close_BANG_ = function(a) {
  lt.objs.clients.send.call(null, a, new cljs.core.Keyword(null, "client.close", "client.close", 2801102215));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.objs.clients.cancel_all_BANG_ = function(a) {
  return lt.objs.clients.send.call(null, a, new cljs.core.Keyword(null, "client.cancel-all", "client.cancel-all", 3113005379));
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "clients", "lt.objs.clients/clients", 2829334861), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), new cljs.core.Keyword(null, "disconnect", "disconnect", 1544309774), new cljs.core.Keyword(null, "message", "message", 1968829305)], null), new cljs.core.Keyword(null, 
"behaviors", "behaviors", 607554515), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.clients", "handle-message", "lt.objs.clients/handle-message", 943314615), new cljs.core.Keyword("lt.objs.clients", "notify-connect", "lt.objs.clients/notify-connect", 1621214643)], null), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"clients", "clients", 1874491770), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function() {
  return null;
});
lt.objs.clients.clients = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients", "clients", "lt.objs.clients/clients", 2829334861));
lt.objs.clients.__BEH__close_clients_on_closed = function(a) {
  a = cljs.core.seq.call(null, cljs.core.deref.call(null, lt.objs.clients.cs));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      cljs.core.nth.call(null, e, 0, null);
      e = cljs.core.nth.call(null, e, 1, null);
      lt.objs.clients.close_BANG_.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        cljs.core.chunked_seq_QMARK_.call(null, a) ? (c = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), b = c, c = cljs.core.count.call(null, c)) : (b = cljs.core.first.call(null, a), cljs.core.nth.call(null, b, 0, null), e = cljs.core.nth.call(null, b, 1, null), lt.objs.clients.close_BANG_.call(null, e), a = cljs.core.next.call(null, a), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "close-clients-on-closed", "lt.objs.clients/close-clients-on-closed", 637496405), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__close_clients_on_closed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closing", "closing", 1880444967), null], null), null));
lt.objs.clients.__BEH__on_destroy_remove_cb = function(a) {
  return lt.objs.clients.rem_cb.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "on-destroy-remove-cb", "lt.objs.clients/on-destroy-remove-cb", 1411509012), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__on_destroy_remove_cb, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null], null), null));
lt.objs.clients.__BEH__raise_on_object = function(a, b) {
  var c = cljs.core.nth.call(null, b, 0, null), d = cljs.core.nth.call(null, b, 1, null), e = cljs.core.nth.call(null, b, 2, null);
  return lt.object.raise.call(null, lt.object.by_id.call(null, c), cljs.core.keyword.call(null, d), e);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "raise-on-object", "lt.objs.clients/raise-on-object", 4358681993), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__raise_on_object, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clients.raise-on-object", "clients.raise-on-object", 4257665496), null], null), 
null));
lt.objs.clients.__BEH__handle_message = function(a, b) {
  var c = cljs.core.nth.call(null, b, 0, null), d = cljs.core.nth.call(null, b, 1, null), e = cljs.core.nth.call(null, b, 2, null);
  return cljs.core.truth_(lt.objs.clients.callback_QMARK_.call(null, c)) ? lt.objs.clients.call.call(null, c, cljs.core.keyword.call(null, d), e) : cljs.core.truth_(lt.object.by_id.call(null, c)) ? lt.object.raise.call(null, lt.object.by_id.call(null, c), cljs.core.keyword.call(null, d), e) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.object.raise.call(null, lt.objs.clients.clients, cljs.core.keyword.call(null, d), e) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "handle-message", "lt.objs.clients/handle-message", 943314615), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__handle_message, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "message", "message", 1968829305), null], null), null));
lt.objs.clients.__BEH__notify_connect = function(a, b) {
  return lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Connected to "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)))].join(""));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "notify-connect", "lt.objs.clients/notify-connect", 1621214643), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__notify_connect, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), null], null), null));
lt.objs.clients.placeholder = function() {
  return lt.object.add_tags.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients", "client", "lt.objs.clients/client", 613325584)), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "client.placeholder", "client.placeholder", 3878144834)], null));
};
lt.objs.clients.placeholder_QMARK_ = function(a) {
  return lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "client.placeholder", "client.placeholder", 3878144834));
};
lt.objs.clients.swap_client_BANG_ = function(a, b) {
  for (var c = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "queue", "queue", 1121848451)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      lt.object.raise.call(null, b, new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), f = cljs.core.chunk_rest.call(null, d), d = c, e = cljs.core.count.call(null, c), c = f) : (c = cljs.core.first.call(null, d), lt.object.raise.call(null, b, new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), c), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "swapped", "swapped", 3497510414), b);
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "client", "lt.objs.clients/client", 613325584), new cljs.core.Keyword(null, "queue", "queue", 1121848451), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "client", "client", 3951159101), null], null), null));
lt.objs.clients.__BEH__try_send = function(a, b) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "connected", "connected", 4729661051)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), b) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "queue!", "queue!", 4360174754), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "try-send", "lt.objs.clients/try-send", 3878204287), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__try_send, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), null], null), null));
lt.objs.clients.__BEH__queue_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "queue", "queue", 1121848451)], null), cljs.core.conj, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "queue!", "lt.objs.clients/queue!", 1558951525), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__queue_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "queue!", "queue!", 4360174754), null], null), null));
lt.objs.clients.__BEH__on_connect_drain = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connected", "connected", 4729661051), !0], null));
  for (var b = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "queue", "queue", 1121848451)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), f);
      cljs.core.doall.call(null, cljs.core.range.call(null, 1E4));
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), b), cljs.core.doall.call(null, cljs.core.range.call(null, 1E4)), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "queue", "queue", 1121848451), cljs.core.PersistentVector.EMPTY], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "on-connect-drain", "lt.objs.clients/on-connect-drain", 776020788), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__on_connect_drain, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), null], null), null));
lt.objs.clients.__BEH__remove_placeholder_on_swapped = function(a) {
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients", "remove-placeholder-on-swapped", "lt.objs.clients/remove-placeholder-on-swapped", 1591563750), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.__BEH__remove_placeholder_on_swapped, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "swapped", "swapped", 3497510414), null], 
null), null));
lt.objs.deploy = {};
lt.objs.deploy.shell = lt.util.load.node_module.call(null, "shelljs");
lt.objs.deploy.fs = require("fs");
lt.objs.deploy.zlib = require("zlib");
lt.objs.deploy.request = lt.util.load.node_module.call(null, "request");
lt.objs.deploy.tar = lt.util.load.node_module.call(null, "tar");
lt.objs.deploy.home_path = lt.objs.files.lt_home.call(null, "");
lt.objs.deploy.tar_path = function(a) {
  return cljs.core.truth_(lt.objs.cache.fetch.call(null, new cljs.core.Keyword(null, "edge", "edge", 1017012527))) ? "" + cljs.core.str("https://api.github.com/repos/LightTable/LightTable/tarball/master") : [cljs.core.str("https://api.github.com/repos/LightTable/LightTable/tarball/"), cljs.core.str(a)].join("");
};
lt.objs.deploy.version_regex = /^\d+\.\d+\.\d+(-.*)?$/;
lt.objs.deploy.get_versions = function() {
  var a = (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, lt.objs.files.lt_home.call(null, "core/version.json")));
  return cljs.core.js__GT_clj.call(null, JSON.parse(a), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
};
lt.objs.deploy.proxy_QMARK_ = function() {
  var a = lt.objs.deploy.get_proxy.call(null, lt.objs.deploy.tar_path.call(null, "0.5.0"));
  return lt.util.cljs.str_contains_QMARK_.call(null, a, "PROXY") ? cljs.core.second.call(null, clojure.string.split.call(null, a, " ")) : null;
};
lt.objs.deploy.version_timeout = 36E5;
lt.objs.deploy.version = lt.objs.deploy.get_versions.call(null);
lt.objs.deploy.str__GT_version = function(a) {
  var b = clojure.string.split.call(null, a, ".");
  a = cljs.core.nth.call(null, b, 0, null);
  var c = cljs.core.nth.call(null, b, 1, null), b = cljs.core.nth.call(null, b, 2, null);
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "major", "major", 1117563179), parseInt(a), new cljs.core.Keyword(null, "minor", "minor", 1117805351), parseInt(c), new cljs.core.Keyword(null, "patch", "patch", 1120342970), parseInt(b)], null);
};
lt.objs.deploy.compare_versions = function(a, b) {
  return cljs.core._EQ_.call(null, a, b) ? !1 : !((new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(b) < (new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(a) || cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(a)) && (new cljs.core.Keyword(null, "minor", "minor", 
  1117805351)).cljs$core$IFn$_invoke$arity$1(b) < (new cljs.core.Keyword(null, "minor", "minor", 1117805351)).cljs$core$IFn$_invoke$arity$1(a) || cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "major", "major", 1117563179)).cljs$core$IFn$_invoke$arity$1(a)) && cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "minor", "minor", 1117805351)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, 
  "minor", "minor", 1117805351)).cljs$core$IFn$_invoke$arity$1(a)) && (new cljs.core.Keyword(null, "patch", "patch", 1120342970)).cljs$core$IFn$_invoke$arity$1(b) < (new cljs.core.Keyword(null, "patch", "patch", 1120342970)).cljs$core$IFn$_invoke$arity$1(a));
};
lt.objs.deploy.is_newer_QMARK_ = function(a, b) {
  return lt.objs.deploy.compare_versions.call(null, lt.objs.deploy.str__GT_version.call(null, a), lt.objs.deploy.str__GT_version.call(null, b));
};
lt.objs.deploy.download_file = function(a, b, c) {
  var d = {url:a, headers:{"User-Agent":"Light Table"}};
  b = lt.objs.deploy.fs.createWriteStream(b);
  var e = function() {
    var a = process.env.http_proxy;
    return cljs.core.truth_(a) ? a : process.env.https_proxy;
  }();
  cljs.core.truth_(e) && (d.proxy = e);
  return lt.objs.deploy.request.get(d, c).on("response", function(b) {
    if (cljs.core._EQ_.call(null, b.statusCode, 200)) {
      return null;
    }
    lt.objs.notifos.done_working.call(null);
    throw Error([cljs.core.str("Error downloading: "), cljs.core.str(a), cljs.core.str(" status code: "), cljs.core.str(b.statusCode)].join(""));
  }).pipe(b);
};
lt.objs.deploy.download_zip = function(a, b) {
  lt.objs.notifos.working.call(null, [cljs.core.str("Downloading version "), cljs.core.str(a), cljs.core.str(" ..")].join(""));
  return lt.objs.deploy.download_file.call(null, lt.objs.deploy.tar_path.call(null, a), [cljs.core.str(lt.objs.deploy.home_path), cljs.core.str("/tmp.tar.gz")].join(""), function(a, d, e) {
    lt.objs.notifos.done_working.call(null);
    return b.call(null, a, d, e);
  });
};
lt.objs.deploy.untar = function(a, b, c) {
  return lt.objs.deploy.fs.createReadStream(a).pipe(lt.objs.deploy.zlib.createGunzip()).pipe(lt.objs.deploy.tar.Extract({path:b})).on("end", c);
};
lt.objs.deploy.move_tmp = function() {
  for (var a = cljs.core.first.call(null, lt.objs.files.full_path_ls.call(null, [cljs.core.str(lt.objs.deploy.home_path), cljs.core.str("/tmp/")].join(""))), a = cljs.core.seq.call(null, lt.objs.files.full_path_ls.call(null, [cljs.core.str(a), cljs.core.str("/deploy/")].join(""))), b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.objs.deploy.shell.cp("-rf", e, lt.objs.deploy.home_path);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), d = cljs.core.chunk_rest.call(null, b), b = a, c = cljs.core.count.call(null, a), a = d) : (a = cljs.core.first.call(null, b), lt.objs.deploy.shell.cp("-rf", a, lt.objs.deploy.home_path), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        break;
      }
    }
  }
  return lt.objs.deploy.shell.rm("-rf", [cljs.core.str(lt.objs.deploy.home_path), cljs.core.str("/tmp*")].join(""));
};
lt.objs.deploy.fetch_and_deploy = function(a) {
  return lt.objs.deploy.download_zip.call(null, a, function() {
    lt.objs.notifos.working.call(null, "Extracting update...");
    return lt.objs.deploy.untar.call(null, [cljs.core.str(lt.objs.deploy.home_path), cljs.core.str("/tmp.tar.gz")].join(""), [cljs.core.str(lt.objs.deploy.home_path), cljs.core.str("/tmp")].join(""), function() {
      lt.objs.deploy.move_tmp.call(null);
      lt.objs.notifos.done_working.call(null);
      lt.objs.deploy.version = cljs.core.assoc.call(null, lt.objs.deploy.version, new cljs.core.Keyword(null, "version", "version", 1365512266), a);
      return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Light Table has been updated!", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("Light Table has been updated to "), cljs.core.str(a), cljs.core.str("! Just\n                                                         restart to get the latest and greatest.")].join(""), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), 
      new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "ok"], null)], null)], null));
    });
  });
};
lt.objs.deploy.tags_url = "https://api.github.com/repos/LightTable/LightTable/tags";
lt.objs.deploy.should_update_popup = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "There's a newer version of Light Table!", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("Would you like us to download and install version "), cljs.core.str(a), cljs.core.str("?")].join(""), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Cancel"], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Download and install", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    return lt.objs.deploy.fetch_and_deploy.call(null, a);
  }], null)], null)], null));
};
lt.objs.deploy.__GT_latest_version = function(a) {
  var b;
  try {
    b = JSON.parse(a);
  } catch (c) {
    b = lt.objs.console.error.call(null, [cljs.core.str("Invalid JSON response from "), cljs.core.str(lt.objs.deploy.tags_url), cljs.core.str(": "), cljs.core.str(cljs.core.pr_str.call(null, a))].join(""));
  }
  return cljs.core.truth_(b) ? cljs.core.last.call(null, cljs.core.sort.call(null, cljs.core.keep.call(null, function(a) {
    return cljs.core.truth_(cljs.core.re_find.call(null, lt.objs.deploy.version_regex, a.name)) ? a.name : null;
  }, b))) : null;
};
lt.objs.deploy.check_version = function() {
  var a = function(a) {
    var b = cljs.core.nth.call(null, a, 0, null);
    return fetch.core.xhr.call(null, lt.objs.deploy.tags_url, cljs.core.PersistentArrayMap.EMPTY, function(a) {
      var c = lt.objs.deploy.__GT_latest_version.call(null, a);
      return cljs.core.truth_(cljs.core.re_find.call(null, lt.objs.deploy.version_regex, c)) ? cljs.core.truth_(function() {
        var a = cljs.core.not_EQ_.call(null, c, "");
        return a && (a = cljs.core.not_EQ_.call(null, c, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version))) ? (a = lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version), c)) ? cljs.core.truth_(b) ? b : cljs.core.not_EQ_.call(null, localStorage.fetchedVersion, c) : a : a;
      }()) ? (localStorage.fetchedVersion = c, lt.objs.deploy.should_update_popup.call(null, c)) : cljs.core.truth_(b) ? lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("At latest version: "), cljs.core.str((new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version))].join("")) : null : null;
    });
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.deploy.binary_version = function() {
  return process.versions.electron;
};
lt.objs.deploy.button = function() {
  var a = function(a, b) {
    for (var e = cljs.core.nth.call(null, b, 0, null), f = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.button.right", "div.button.right", 629503503), a], null)), g = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
      return cljs.core.truth_(e) ? e.call(null) : null;
    }], null))), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), n = cljs.core.nth.call(null, m, 0, null), m = cljs.core.nth.call(null, m, 1, null);
        lt.util.dom.on.call(null, f, n, m);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          cljs.core.chunked_seq_QMARK_.call(null, g) ? (k = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), h = k, k = cljs.core.count.call(null, k)) : (k = cljs.core.first.call(null, g), h = cljs.core.nth.call(null, k, 0, null), k = cljs.core.nth.call(null, k, 1, null), lt.util.dom.on.call(null, f, h, k), g = cljs.core.next.call(null, g), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    return f;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.deploy.alert_binary_update = function() {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "There's been a binary update!", new cljs.core.Keyword(null, "body", "body", 1016933652), "There's a new version of the Light Table binary. Clicking below will open the\n                                 Light Table website so you can download the updated version.", new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Download latest", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    lt.objs.platform.open_url.call(null, "http://www.lighttable.com");
    return lt.objs.popup.remain_open.call(null);
  }], null)], null)], null));
};
lt.objs.deploy.__BEH__check_deploy = function(a) {
  return lt.objs.deploy.is_newer_QMARK_.call(null, lt.objs.deploy.binary_version.call(null), (new cljs.core.Keyword(null, "electron", "electron", 996780372)).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version)) ? lt.objs.deploy.alert_binary_update.call(null) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.deploy", "check-deploy", "lt.objs.deploy/check-deploy", 1596260355), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.deploy.__BEH__check_deploy, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "deploy", "deploy", 3973538905), null], null), null));
lt.objs.deploy.__BEH__check_version = function(a) {
  lt.objs.app.first_window_QMARK_.call(null) && (localStorage.fetchedVersion = null);
  lt.objs.deploy.check_version.call(null);
  return lt.util.js.every.call(null, lt.objs.deploy.version_timeout, lt.objs.deploy.check_version);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.deploy", "check-version", "lt.objs.deploy/check-version", 3501318508), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.deploy.__BEH__check_version, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Automatically check for updates", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"init", "init", 1017141378), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.object.tag_behaviors.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.deploy", "check-deploy", "lt.objs.deploy/check-deploy", 1596260355)], null));
lt.objs.plugins = {};
lt.objs.plugins.plugins_dir = lt.objs.files.lt_home.call(null, "plugins");
lt.objs.plugins.user_plugins_dir = lt.objs.files.lt_user_dir.call(null, "plugins");
lt.objs.plugins._STAR_plugin_dir_STAR_ = null;
lt.objs.plugins.EOF_read = function(a) {
  return cljs.core.truth_(cljs.core.truth_(a) ? cljs.core.seq.call(null, a) : a) ? cljs.reader.read_string.call(null, a) : null;
};
lt.objs.plugins.munge_plugin_name = function(a) {
  return cljs.core.truth_(a) ? clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, a, " ", "_"), "-", "_"), ".", "_") : null;
};
lt.objs.plugins.adjust_path = function(a) {
  return lt.objs.files.absolute_QMARK_.call(null, a) ? a : lt.objs.files.join.call(null, function() {
    var a = (new cljs.core.Keyword("lt.objs.plugins", "dir", "lt.objs.plugins/dir", 3366558592)).cljs$core$IFn$_invoke$arity$1(lt.object._STAR_behavior_meta_STAR_);
    return cljs.core.truth_(a) ? a : lt.objs.files.lt_home.call(null);
  }(), a);
};
lt.objs.plugins.find_plugin = function(a) {
  a = lt.objs.plugins.munge_plugin_name.call(null, a);
  if (cljs.core.truth_((new cljs.core.Keyword("lt.objs.plugins", "dir", "lt.objs.plugins/dir", 3366558592)).cljs$core$IFn$_invoke$arity$1(lt.object._STAR_behavior_meta_STAR_))) {
    return(new cljs.core.Keyword("lt.objs.plugins", "dir", "lt.objs.plugins/dir", 3366558592)).cljs$core$IFn$_invoke$arity$1(lt.object._STAR_behavior_meta_STAR_);
  }
  if (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.join.call(null, lt.objs.plugins.user_plugins_dir, a)))) {
    return lt.objs.files.join.call(null, lt.objs.plugins.user_plugins_dir, a);
  }
  if (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.files.join.call(null, lt.objs.plugins.plugins_dir, a)))) {
    return lt.objs.files.join.call(null, lt.objs.plugins.plugins_dir, a);
  }
  new cljs.core.Keyword(null, "else", "else", 1017020587);
  return null;
};
lt.objs.plugins.local_module = function(a, b) {
  var c = lt.objs.plugins.find_plugin.call(null, a);
  return cljs.core.truth_(c) ? lt.objs.files.join.call(null, c, "node_modules", b) : null;
};
lt.objs.plugins.by_name = function(a) {
  return cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)), a);
};
lt.objs.plugins.installed_QMARK_ = function(a) {
  return cljs.core.boolean$.call(null, lt.objs.plugins.by_name.call(null, a));
};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "build", "build", 1107999200), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: build file or project", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "build", "build", 1107999200)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "behaviors.force-reload", "behaviors.force-reload", 1611218586), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugins: Ignore cache and force reload the current behaviors file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) && cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "editor.behaviors", "editor.behaviors", 2095045778))) ? (cljs.core.swap_BANG_.call(null, lt.objs.plugins.manager, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "force-reload", "lt.objs.plugins/force-reload", 4731263182)], null), function(b) {
    return cljs.core.conj.call(null, cljs.core.truth_(b) ? b : cljs.core.PersistentHashSet.EMPTY, cljs.core.get_in.call(null, cljs.core.deref.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "path", "path", 1017337751)], null)));
  }), lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600))) : null;
}], null));
lt.objs.plugins.validate = function(a, b) {
  if (cljs.core.every_QMARK_.call(null, a, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "name", "name", 1017277949), new cljs.core.Keyword(null, "author", "author", 3902543101), new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), new cljs.core.Keyword(null, "desc", "desc", 1016984067)], null))) {
    return a;
  }
  lt.objs.console.error.call(null, [cljs.core.str("Invalid "), cljs.core.str(b), cljs.core.str(" file: "), cljs.core.str((new cljs.core.Keyword(null, "dir", "dir", 1014003711)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str("/"), cljs.core.str(b), cljs.core.str("\nPlugins "), cljs.core.str("must include values for name, version, author, behaviors, and desc.")].join(""));
  return null;
};
lt.objs.plugins.plugin_edn = function(a) {
  var b = lt.objs.files.join.call(null, a, "plugin.edn");
  var c = lt.objs.files.exists_QMARK_.call(null, b), b = cljs.core.truth_(c) ? lt.objs.files.open_sync.call(null, b) : c;
  if (cljs.core.truth_(b)) {
    try {
      return lt.objs.plugins.validate.call(null, cljs.core.assoc.call(null, lt.objs.plugins.EOF_read.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(b)), new cljs.core.Keyword(null, "dir", "dir", 1014003711), a), "plugin.edn");
    } catch (d) {
      return lt.objs.console.error.call(null, [cljs.core.str("FAILED to load plugin.edn: "), cljs.core.str(a)].join(""));
    }
  } else {
    return null;
  }
};
lt.objs.plugins.plugin_json = function(a) {
  var b = lt.objs.files.join.call(null, a, "plugin.json");
  var c = lt.objs.files.exists_QMARK_.call(null, b), b = cljs.core.truth_(c) ? lt.objs.files.open_sync.call(null, b) : c;
  return cljs.core.truth_(b) ? lt.objs.plugins.validate.call(null, cljs.core.assoc.call(null, cljs.core.js__GT_clj.call(null, JSON.parse((new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(b)), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0), new cljs.core.Keyword(null, "dir", "dir", 1014003711), a), "plugin.json") : null;
};
lt.objs.plugins.plugin_info = function(a) {
  var b = lt.objs.plugins.plugin_json.call(null, a);
  return cljs.core.truth_(b) ? b : lt.objs.plugins.plugin_edn.call(null, a);
};
lt.objs.plugins.missing_deps = function(a) {
  var b = cljs.core.mapcat.call(null, cljs.core.comp.call(null, cljs.core.seq, new cljs.core.Keyword(null, "dependencies", "dependencies", 1517678747)), cljs.core.vals.call(null, a));
  return cljs.core.seq.call(null, cljs.core.vals.call(null, cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(b, d) {
    var e = cljs.core.nth.call(null, d, 0, null), f = cljs.core.nth.call(null, d, 1, null), e = cljs.core.name.call(null, e), g;
    g = cljs.core.get.call(null, a, e);
    g = cljs.core.truth_(g) ? g : cljs.core.get.call(null, b, e);
    return cljs.core.truth_(g) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(g), f) ? cljs.core.assoc_BANG_.call(null, b, e, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "name", "name", 1017277949), e, new cljs.core.Keyword(null, "version", "version", 1365512266), f], null)) : b : cljs.core.assoc_BANG_.call(null, b, e, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
    "name", "name", 1017277949), e, new cljs.core.Keyword(null, "version", "version", 1365512266), f], null));
  }, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), b))));
};
lt.objs.plugins.outdated_QMARK_ = function(a) {
  var b = (new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)));
  return cljs.core.truth_(b) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a), b) : null;
};
lt.objs.plugins.plugin_behaviors = function(a) {
  if (cljs.core.seq.call(null, a)) {
    try {
      var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, c = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "dir", "dir", 1014003711)), d = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515)), e = lt.objs.files.join.call(null, c, d), f = lt.objs.files.real_path.call(null, e), g = lt.objs.settings.parse_file.call(null, f), h = cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "force-reload", 
      "lt.objs.plugins/force-reload", 4731263182)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), f);
      cljs.core.truth_(h) && cljs.core.swap_BANG_.call(null, lt.objs.plugins.manager, cljs.core.update_in, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "force-reload", "lt.objs.plugins/force-reload", 4731263182)], null), cljs.core.disj, f);
      return cljs.core.truth_(g) ? (clojure.walk.prewalk.call(null, function(a) {
        cljs.core.coll_QMARK_.call(null, a) && cljs.core.alter_meta_BANG_.call(null, a, cljs.core.assoc, new cljs.core.Keyword("lt.objs.plugins", "dir", "lt.objs.plugins/dir", 3366558592), c, new cljs.core.Keyword("lt.objs.plugins", "force-reload", "lt.objs.plugins/force-reload", 4731263182), h);
        return a;
      }, g), g) : null;
    } catch (k) {
      return lt.objs.console.error.call(null, [cljs.core.str("Could not load behaviors for plugin: "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a))].join("")), cljs.core.PersistentArrayMap.EMPTY;
    }
  } else {
    return null;
  }
};
lt.objs.plugins.plugin_dependency_graph = function(a) {
  return cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
    return function c(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, a);
          if (e) {
            if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
              var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
              a: {
                for (var k = 0;;) {
                  if (k < g) {
                    var l = cljs.core._nth.call(null, f, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null);
                    cljs.core.chunk_append.call(null, h, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [m, cljs.core.set.call(null, cljs.core.map.call(null, cljs.core.name, cljs.core.keys.call(null, (new cljs.core.Keyword(null, "dependencies", "dependencies", 1517678747)).cljs$core$IFn$_invoke$arity$1(l))))], null));
                    k += 1;
                  } else {
                    f = !0;
                    break a;
                  }
                }
                f = void 0;
              }
              return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
            }
            f = cljs.core.first.call(null, e);
            h = cljs.core.nth.call(null, f, 0, null);
            f = cljs.core.nth.call(null, f, 1, null);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [h, cljs.core.set.call(null, cljs.core.map.call(null, cljs.core.name, cljs.core.keys.call(null, (new cljs.core.Keyword(null, "dependencies", "dependencies", 1517678747)).cljs$core$IFn$_invoke$arity$1(f))))], null), c.call(null, cljs.core.rest.call(null, e)));
          }
          return null;
        }
      }, null, null);
    }.call(null, a);
  }());
};
lt.objs.plugins.find_cycles = function find_cycles(b, c) {
  var d = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c, e = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "graph", "graph", 1112519872)), f = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "stack", "stack", 1123661306)), g = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "root", "root", 1017410644)), h = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "seen", "seen", 1017430509));
  return cljs.core.first.call(null, cljs.core.filter.call(null, cljs.core.identity, function() {
    return function l(b) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var c = cljs.core.seq.call(null, b);
          if (c) {
            if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
              var h = cljs.core.chunk_first.call(null, c), q = cljs.core.count.call(null, h), r = cljs.core.chunk_buffer.call(null, q);
              a: {
                for (var s = 0;;) {
                  if (s < q) {
                    var t = cljs.core._nth.call(null, h, s);
                    cljs.core.chunk_append.call(null, r, cljs.core._EQ_.call(null, t, g) ? cljs.core.conj.call(null, f, t) : find_cycles.call(null, cljs.core.get.call(null, e, t), cljs.core.update_in.call(null, cljs.core.update_in.call(null, d, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "stack", "stack", 1123661306)], null), cljs.core.conj, t), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
                    "seen", "seen", 1017430509)], null), cljs.core.conj, t)));
                    s += 1;
                  } else {
                    h = !0;
                    break a;
                  }
                }
                h = void 0;
              }
              return h ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, r), l.call(null, cljs.core.chunk_rest.call(null, c))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, r), null);
            }
            r = cljs.core.first.call(null, c);
            return cljs.core.cons.call(null, cljs.core._EQ_.call(null, r, g) ? cljs.core.conj.call(null, f, r) : find_cycles.call(null, cljs.core.get.call(null, e, r), cljs.core.update_in.call(null, cljs.core.update_in.call(null, d, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "stack", "stack", 1123661306)], null), cljs.core.conj, r), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
            "seen", "seen", 1017430509)], null), cljs.core.conj, r)), l.call(null, cljs.core.rest.call(null, c)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.remove.call(null, h, b));
  }()));
};
lt.objs.plugins.__GT_cycles = function(a) {
  return cljs.core.filterv.call(null, cljs.core.identity, function() {
    return function c(d) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, d);
          if (e) {
            if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
              var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
              a: {
                for (var k = 0;;) {
                  if (k < g) {
                    var l = cljs.core._nth.call(null, f, k), m = cljs.core.nth.call(null, l, 0, null), l = cljs.core.nth.call(null, l, 1, null), m = lt.objs.plugins.find_cycles.call(null, l, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "seen", "seen", 1017430509), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "stack", "stack", 1123661306), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [m], null), new cljs.core.Keyword(null, 
                    "graph", "graph", 1112519872), a, new cljs.core.Keyword(null, "root", "root", 1017410644), m], null));
                    cljs.core.chunk_append.call(null, h, m);
                    k += 1;
                  } else {
                    f = !0;
                    break a;
                  }
                }
                f = void 0;
              }
              return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
            }
            f = cljs.core.first.call(null, e);
            h = cljs.core.nth.call(null, f, 0, null);
            f = cljs.core.nth.call(null, f, 1, null);
            h = lt.objs.plugins.find_cycles.call(null, f, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "seen", "seen", 1017430509), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "stack", "stack", 1123661306), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [h], null), new cljs.core.Keyword(null, "graph", "graph", 1112519872), a, new cljs.core.Keyword(null, "root", "root", 1017410644), h], null));
            return cljs.core.cons.call(null, h, c.call(null, cljs.core.rest.call(null, e)));
          }
          return null;
        }
      }, null, null);
    }.call(null, a);
  }());
};
lt.objs.plugins.cycle_desc = function(a) {
  return function c(a) {
    return new cljs.core.LazySeq(null, function() {
      for (;;) {
        var e = cljs.core.seq.call(null, a);
        if (e) {
          if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
            var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
            a: {
              for (var k = 0;;) {
                if (k < g) {
                  var l = cljs.core._nth.call(null, f, k);
                  cljs.core.chunk_append.call(null, h, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), cljs.core.reduce.call(null, cljs.core.str, cljs.core.interpose.call(null, " \x3d\x3e ", l))], null));
                  k += 1;
                } else {
                  f = !0;
                  break a;
                }
              }
              f = void 0;
            }
            return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
          }
          h = cljs.core.first.call(null, e);
          return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), cljs.core.reduce.call(null, cljs.core.str, cljs.core.interpose.call(null, " \x3d\x3e ", h))], null), c.call(null, cljs.core.rest.call(null, e)));
        }
        return null;
      }
    }, null, null);
  }.call(null, a);
};
lt.objs.plugins.metadata_commits = "https://api.github.com/repos/LightTable/plugin-metadata/commits";
lt.objs.plugins.metadata_download = "https://api.github.com/repos/LightTable/plugin-metadata/tarball/master";
lt.objs.plugins.metadata_dir = lt.objs.files.lt_user_dir.call(null, "metadata");
lt.objs.plugins.metadata_cache = lt.objs.files.join.call(null, lt.objs.plugins.metadata_dir, "cache.json");
lt.objs.plugins.version_sort = function(a, b) {
  return cljs.core._EQ_.call(null, a, b) ? 0 : lt.objs.deploy.is_newer_QMARK_.call(null, a, b) ? -1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? 1 : null;
};
lt.objs.plugins.build_cache = function(a) {
  var b = cljs.core.filter.call(null, lt.objs.files.dir_QMARK_, lt.objs.files.full_path_ls.call(null, lt.objs.plugins.metadata_dir));
  return cljs.core.into.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "__sha", "__sha", 1104582718), a], null), function() {
    return function(a) {
      return function e(b) {
        return new cljs.core.LazySeq(null, function(a) {
          return function() {
            for (;;) {
              var a = cljs.core.seq.call(null, b);
              if (a) {
                if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                  var c = cljs.core.chunk_first.call(null, a), g = cljs.core.count.call(null, c), m = cljs.core.chunk_buffer.call(null, g);
                  a: {
                    for (var n = 0;;) {
                      if (n < g) {
                        var p = cljs.core._nth.call(null, c, n), p = cljs.core.vec.call(null, cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "version", "version", 1365512266), lt.objs.plugins.version_sort, cljs.core.map.call(null, lt.objs.plugins.plugin_info, cljs.core.filter.call(null, lt.objs.files.dir_QMARK_, lt.objs.files.full_path_ls.call(null, p))))), q = cljs.core.last.call(null, p);
                        cljs.core.chunk_append.call(null, m, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(q), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "versions", "versions", 3323818509), cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, cljs.core.juxt.call(null, new cljs.core.Keyword(null, "version", "version", 
                        1365512266), cljs.core.identity), p)), new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(q)], null)], null));
                        n += 1;
                      } else {
                        c = !0;
                        break a;
                      }
                    }
                    c = void 0;
                  }
                  return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, m), e.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, m), null);
                }
                m = cljs.core.first.call(null, a);
                m = cljs.core.vec.call(null, cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "version", "version", 1365512266), lt.objs.plugins.version_sort, cljs.core.map.call(null, lt.objs.plugins.plugin_info, cljs.core.filter.call(null, lt.objs.files.dir_QMARK_, lt.objs.files.full_path_ls.call(null, m)))));
                c = cljs.core.last.call(null, m);
                return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "versions", "versions", 3323818509), cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, cljs.core.map.call(null, cljs.core.juxt.call(null, new cljs.core.Keyword(null, "version", "version", 1365512266), 
                cljs.core.identity), m)), new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(c)], null)], null), e.call(null, cljs.core.rest.call(null, a)));
              }
              return null;
            }
          };
        }(a), null, null);
      };
    }(b).call(null, b);
  }());
};
lt.objs.plugins.save_cache = function(a) {
  return lt.objs.files.save.call(null, lt.objs.plugins.metadata_cache, JSON.stringify(cljs.core.clj__GT_js.call(null, a)));
};
lt.objs.plugins.latest_metadata_sha = function() {
  return fetch.core.xhr.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "get", "get", 1014006472), lt.objs.plugins.metadata_commits], null), cljs.core.PersistentArrayMap.EMPTY, function(a) {
    var b;
    try {
      b = JSON.parse(a);
    } catch (c) {
      b = lt.objs.console.error.call(null, [cljs.core.str("Invalid JSON response from "), cljs.core.str(lt.objs.plugins.metadata_commits), cljs.core.str(": "), cljs.core.str(cljs.core.pr_str.call(null, a))].join(""));
    }
    return cljs.core.truth_(b) ? (a = b[0].sha, lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "metadata.sha", "metadata.sha", 2333336799), a)) : null;
  });
};
lt.objs.plugins.download_metadata = function(a) {
  var b = lt.objs.files.lt_user_dir.call(null, "metadata-temp.tar.gz"), c = lt.objs.files.lt_user_dir.call(null, "metadata-temp");
  lt.objs.notifos.working.call(null, "Updating plugin metadata");
  return lt.objs.deploy.download_file.call(null, lt.objs.plugins.metadata_download, b, function() {
    return lt.objs.deploy.untar.call(null, b, c, function() {
      lt.objs.notifos.done_working.call(null);
      var d = cljs.core.first.call(null, lt.objs.files.full_path_ls.call(null, c));
      cljs.core.truth_(d) && (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.plugins.metadata_dir)) && lt.objs.files.delete_BANG_.call(null, lt.objs.plugins.metadata_dir), lt.objs.files.move_BANG_.call(null, d, lt.objs.plugins.metadata_dir));
      lt.objs.files.delete_BANG_.call(null, c);
      lt.objs.files.delete_BANG_.call(null, b);
      return cljs.core.truth_(d) ? (lt.objs.plugins.save_cache.call(null, lt.objs.plugins.build_cache.call(null, a)), lt.objs.notifos.done_working.call(null, "" + cljs.core.str("Plugin metadata updated. ")), lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "metadata.updated", "metadata.updated", 1526644846))) : lt.objs.plugins.install_failed.call(null, "metadata");
    });
  });
};
lt.objs.plugins.read_cache = function() {
  return cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.plugins.metadata_cache)) ? cljs.core.js__GT_clj.call(null, JSON.parse((new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, lt.objs.plugins.metadata_cache))), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0) : null;
};
lt.objs.plugins.search_plugins = function(a, b) {
  var c = b.toLowerCase();
  return cljs.core.filter.call(null, function(a) {
    return-1 < (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$2(a, "").toLowerCase().indexOf(c) || -1 < (new cljs.core.Keyword(null, "author", "author", 3902543101)).cljs$core$IFn$_invoke$arity$2(a, "").toLowerCase().indexOf(c) || -1 < (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$2(a, "").toLowerCase().indexOf(c);
  }, a);
};
lt.objs.plugins.latest_version_merge = function(a, b) {
  var c = cljs.core.seq.call(null, a);
  return cljs.core.reduce.call(null, function(a, b) {
    var c = cljs.core.nth.call(null, b, 0, null), g = cljs.core.nth.call(null, b, 1, null), h = (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a.call(null, c));
    return cljs.core.truth_(h) ? lt.objs.deploy.is_newer_QMARK_.call(null, g, h) ? cljs.core.assoc.call(null, a, c, g) : a : cljs.core.assoc.call(null, a, c, g);
  }, b, c);
};
lt.objs.plugins.transitive_deps = function transitive_deps(b, c, d) {
  var e = cljs.core.nth.call(null, c, 0, null);
  c = cljs.core.nth.call(null, c, 1, null);
  var e = cljs.core.keyword.call(null, e), f = cljs.core.get_in.call(null, b, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, new cljs.core.Keyword(null, "versions", "versions", 3323818509), cljs.core.keyword.call(null, c)], null));
  if (cljs.core.truth_(f)) {
    c = (new cljs.core.Keyword(null, "dependencies", "dependencies", 1517678747)).cljs$core$IFn$_invoke$arity$1(f);
    var g = cljs.core.remove.call(null, d, cljs.core.keys.call(null, c));
    d = lt.objs.plugins.latest_version_merge.call(null, new cljs.core.PersistentArrayMap.fromArray([e, f], !0, !1), d);
    return cljs.core.reduce.call(null, function(c, d) {
      return transitive_deps.call(null, b, d, c);
    }, d, cljs.core.select_keys.call(null, c, g));
  }
  return d;
};
lt.objs.plugins.latest_version = function(a) {
  return cljs.core.get.call(null, (new cljs.core.Keyword(null, "versions", "versions", 3323818509)).cljs$core$IFn$_invoke$arity$1(a), cljs.core.keyword.call(null, (new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348)).cljs$core$IFn$_invoke$arity$1(a)));
};
lt.objs.plugins.all_latest = function(a) {
  return cljs.core.map.call(null, lt.objs.plugins.latest_version, cljs.core.vals.call(null, cljs.core.dissoc.call(null, a, new cljs.core.Keyword(null, "__sha", "__sha", 1104582718))));
};
lt.objs.plugins.install_failed = function(a) {
  cljs.core.truth_(function() {
    var b = lt.objs.plugins.by_name.call(null, a);
    return cljs.core.truth_(b) ? cljs.core.not.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(lt.objs.plugins.by_name.call(null, a))) : b;
  }()) && lt.object.update_BANG_.call(null, lt.objs.app.app, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)], null), cljs.core.dissoc, a);
  return lt.objs.notifos.done_working.call(null, [cljs.core.str("Plugin install failed for: "), cljs.core.str(a)].join(""));
};
lt.objs.plugins.plugin__GT_tar = function(a) {
  var b = cljs.core.take.call(null, 2, cljs.core.filter.call(null, function(a) {
    return cljs.core.not_EQ_.call(null, a, "");
  }, cljs.core.reverse.call(null, clojure.string.split.call(null, (new cljs.core.Keyword(null, "source", "source", 4412365709)).cljs$core$IFn$_invoke$arity$1(a), "/")))), c = cljs.core.nth.call(null, b, 0, null), b = cljs.core.nth.call(null, b, 1, null), c = c.replace(/.git/, "");
  return[cljs.core.str("https://api.github.com/repos/"), cljs.core.str(b), cljs.core.str("/"), cljs.core.str(c), cljs.core.str("/tarball/"), cljs.core.str((new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a))].join("");
};
lt.objs.plugins.fetch_and_install = function(a, b, c) {
  var d = lt.objs.plugins.munge_plugin_name.call(null, b), e = [cljs.core.str(lt.objs.plugins.user_plugins_dir), cljs.core.str("/"), cljs.core.str(d), cljs.core.str("-tmp.tar.gz")].join(""), f = [cljs.core.str(lt.objs.plugins.user_plugins_dir), cljs.core.str("/"), cljs.core.str(d), cljs.core.str("-tmp")].join("");
  lt.objs.notifos.working.call(null, [cljs.core.str("Downloading plugin: "), cljs.core.str(b)].join(""));
  return lt.objs.deploy.download_file.call(null, a, e, function() {
    lt.objs.notifos.done_working.call(null);
    lt.objs.notifos.working.call(null, "Extracting plugin...");
    return lt.objs.deploy.untar.call(null, e, f, function() {
      var a = cljs.core.first.call(null, lt.objs.files.full_path_ls.call(null, f)), h = [cljs.core.str(lt.objs.plugins.user_plugins_dir), cljs.core.str("/"), cljs.core.str(d), cljs.core.str("/")].join("");
      cljs.core.truth_(a) && (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, h)) && lt.objs.files.delete_BANG_.call(null, h), lt.objs.files.move_BANG_.call(null, a, h));
      lt.objs.files.delete_BANG_.call(null, f);
      lt.objs.files.delete_BANG_.call(null, e);
      return cljs.core.truth_(a) ? (lt.objs.notifos.done_working.call(null, [cljs.core.str("Plugin fetched: "), cljs.core.str(b)].join("")), lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "plugin.fetched", "plugin.fetched", 1905646736)), cljs.core.truth_(c) ? c.call(null) : null) : lt.objs.plugins.install_failed.call(null, b);
    });
  });
};
lt.objs.plugins.install_version = function(a, b) {
  var c = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), d = (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a), e = cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)), c);
  if (cljs.core.truth_(function() {
    var a = cljs.core.not.call(null, e);
    if (a) {
      return a;
    }
    a = (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(e);
    return cljs.core.truth_(a) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(e), d) : a;
  }())) {
    return lt.object.update_BANG_.call(null, lt.objs.app.app, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)], null), cljs.core.assoc, c, cljs.core.PersistentArrayMap.EMPTY), lt.objs.plugins.fetch_and_install.call(null, lt.objs.plugins.plugin__GT_tar.call(null, a), c, function() {
      return cljs.core.truth_(b) ? b.call(null, !0) : null;
    });
  }
  lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str(c), cljs.core.str(" is already installed")].join(""));
  return cljs.core.truth_(b) ? b.call(null, !1) : null;
};
lt.objs.plugins.transitive_install = function(a, b, c) {
  a = cljs.core.keyword.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a));
  var d = cljs.core.dissoc.call(null, b, a), e = cljs.core.atom.call(null, cljs.core.count.call(null, d));
  a = function(a, d, e) {
    return function() {
      cljs.core.swap_BANG_.call(null, e, cljs.core.dec);
      return 0 >= cljs.core.deref.call(null, e) ? lt.objs.plugins.install_version.call(null, b.call(null, a), function(a, b, d) {
        return function(a) {
          return cljs.core.truth_(c) ? c.call(null, a) : null;
        };
      }(a, d, e)) : null;
    };
  }(a, d, e);
  if (cljs.core.seq.call(null, d)) {
    for (var d = cljs.core.seq.call(null, d), e = null, f = 0, g = 0;;) {
      if (g < f) {
        var h = cljs.core._nth.call(null, e, g);
        cljs.core.nth.call(null, h, 0, null);
        h = cljs.core.nth.call(null, h, 1, null);
        lt.objs.plugins.install_version.call(null, h, a);
        g += 1;
      } else {
        if (d = cljs.core.seq.call(null, d)) {
          cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (e = cljs.core.first.call(null, d), cljs.core.nth.call(null, e, 0, null), h = cljs.core.nth.call(null, e, 1, null), lt.objs.plugins.install_version.call(null, h, a), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
        } else {
          return null;
        }
      }
    }
  } else {
    return a.call(null);
  }
};
lt.objs.plugins.discover_deps = function(a, b) {
  var c = lt.objs.plugins.transitive_deps.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a)], null), cljs.core.PersistentArrayMap.EMPTY);
  return cljs.core.not.call(null, cljs.core.seq.call(null, c)) ? lt.objs.plugins.install_failed.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)) : lt.objs.plugins.transitive_install.call(null, a, c, b);
};
lt.objs.plugins.install_missing = function(a) {
  var b = function(a) {
    return function() {
      cljs.core.swap_BANG_.call(null, a, cljs.core.dec);
      return 0 >= cljs.core.deref.call(null, a) ? (lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600)), lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840)), lt.objs.notifos.set_msg_BANG_.call(null, "All missing dependencies installed.")) : null;
    };
  }(cljs.core.atom.call(null, cljs.core.count.call(null, a)));
  a = cljs.core.seq.call(null, a);
  for (var c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.objs.plugins.discover_deps.call(null, f, b);
      e += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        c = a, cljs.core.chunked_seq_QMARK_.call(null, c) ? (a = cljs.core.chunk_first.call(null, c), d = cljs.core.chunk_rest.call(null, c), c = a, f = cljs.core.count.call(null, a), a = d, d = f) : (f = cljs.core.first.call(null, c), lt.objs.plugins.discover_deps.call(null, f, b), a = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.plugins.check_missing = function(a) {
  var b = lt.objs.plugins.missing_deps.call(null, a);
  return b ? lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Some plugin dependencies are missing.", new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "span", "span", 1017440956), "We found that the following plugin dependencies are missing: "], null), function() {
    return function d(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var g = cljs.core.chunk_first.call(null, b), h = cljs.core.count.call(null, g), k = cljs.core.chunk_buffer.call(null, h);
              a: {
                for (var l = 0;;) {
                  if (l < h) {
                    var m = cljs.core._nth.call(null, g, l), n = cljs.core.seq_QMARK_.call(null, m) ? cljs.core.apply.call(null, cljs.core.hash_map, m) : m, m = cljs.core.get.call(null, n, new cljs.core.Keyword(null, "version", "version", 1365512266)), n = cljs.core.get.call(null, n, new cljs.core.Keyword(null, "name", "name", 1017277949));
                    cljs.core.chunk_append.call(null, k, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), n, " ", m, " "], null));
                    l += 1;
                  } else {
                    g = !0;
                    break a;
                  }
                }
                g = void 0;
              }
              return g ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), d.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), null);
            }
            k = cljs.core.first.call(null, b);
            g = cljs.core.seq_QMARK_.call(null, k) ? cljs.core.apply.call(null, cljs.core.hash_map, k) : k;
            k = cljs.core.get.call(null, g, new cljs.core.Keyword(null, "version", "version", 1365512266));
            g = cljs.core.get.call(null, g, new cljs.core.Keyword(null, "name", "name", 1017277949));
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), g, " ", k, " "], null), d.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, b);
  }(), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), "Would you like us to install them?"], null)], null), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Cancel"], null), new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Install all", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    return lt.objs.plugins.install_missing.call(null, b);
  }], null)], null)], null)) : null;
};
lt.objs.plugins.available_plugins = function() {
  var a = cljs.core.concat.call(null, lt.objs.files.dirs.call(null, lt.objs.plugins.user_plugins_dir), lt.objs.files.dirs.call(null, lt.objs.plugins.plugins_dir), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.settings.user_plugin_dir], null)), a = cljs.core.filterv.call(null, cljs.core.identity, cljs.core.map.call(null, lt.objs.plugins.plugin_info, a));
  return cljs.core.persistent_BANG_.call(null, cljs.core.reduce.call(null, function(a, c) {
    var d = cljs.core.get.call(null, a, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c));
    return cljs.core.truth_(d) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(d), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(c)) ? cljs.core.assoc_BANG_.call(null, a, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c), c) : a : cljs.core.assoc_BANG_.call(null, a, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c), 
    c);
  }, cljs.core.transient$.call(null, cljs.core.PersistentArrayMap.EMPTY), a));
};
lt.objs.plugins.uninstall = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "dir", "dir", 1014003711)).cljs$core$IFn$_invoke$arity$1(a)) ? (lt.objs.files.delete_BANG_.call(null, (new cljs.core.Keyword(null, "dir", "dir", 1014003711)).cljs$core$IFn$_invoke$arity$1(a)), lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), new cljs.core.Keyword(null, "ignore-missing", "ignore-missing", 2124702685), !0), lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Uninstalled "), 
  cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str(" "), cljs.core.str((new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a))].join(""))) : null;
};
lt.objs.plugins.url_input = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 1114262332), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Github URL"], null)], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "popup.input", "popup.input", 4788025210));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "popup.input", "popup.input", 4788025210));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.plugins.tab = function(a, b, c) {
  c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
    return cljs.core._EQ_.call(null, b, (new cljs.core.Keyword(null, "tab", "tab", 1014018823)).cljs$core$IFn$_invoke$arity$1(a)) ? "active" : null;
  })], null), c], null));
  for (var d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab", "tab", 1014018823), b], null));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.plugins.search_input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 1114262332), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Search available plugins"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "plugin-manager.search", "plugin-manager.search", 4116247637), a);
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "plugin-manager.search", "plugin-manager.search", 4116247637));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.tabs_and_search = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tabs", "div.tabs", 1324158509), lt.objs.plugins.tab.call(null, a, new cljs.core.Keyword(null, "installed", "installed", 1042950892), "Installed"), lt.objs.plugins.tab.call(null, a, new cljs.core.Keyword(null, "server", "server", 4403045045), "Available"), lt.objs.plugins.search_input.call(null, a)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.plugins.source_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.source", "span.source", 4763361969), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "a", "a", 1013904339), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "href", "href", 1017115293), (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$2(a, 
  (new cljs.core.Keyword(null, "source", "source", 4412365709)).cljs$core$IFn$_invoke$arity$1(a))], null), "source"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    lt.util.dom.prevent.call(null, b);
    lt.util.dom.stop_propagation.call(null, b);
    return lt.objs.platform.open_url.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$2(a, (new cljs.core.Keyword(null, "source", "source", 4412365709)).cljs$core$IFn$_invoke$arity$1(a)));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.update_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.update", "span.update", 526054239)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    lt.util.dom.prevent.call(null, b);
    lt.util.dom.stop_propagation.call(null, b);
    return lt.objs.plugins.discover_deps.call(null, a, function() {
      lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
      lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600));
      return lt.util.js.wait.call(null, 1E3, function() {
        return lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Updated "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str(" "), cljs.core.str((new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a))].join(""));
      });
    });
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.install_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.install", "span.install", 967456361)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    lt.objs.plugins.discover_deps.call(null, a, function(b) {
      return function() {
        lt.util.dom.remove.call(null, lt.util.dom.parent.call(null, b));
        lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
        lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600));
        return lt.util.js.wait.call(null, 1E3, function(b) {
          return function() {
            return lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Installed "), cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str(" "), cljs.core.str((new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a))].join(""));
          };
        }(b));
      };
    }(this));
    lt.util.dom.prevent.call(null, b);
    return lt.util.dom.stop_propagation.call(null, b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.server_plugin_ui = function(a) {
  for (var b = crate.core.html.call(null, function() {
    var b = (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a), c = cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), d;
    d = (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(c);
    d = cljs.core.truth_(d) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(c), b) : d;
    return new cljs.core.PersistentVector(null, 7, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), cljs.core.truth_(d) ? "has-update" : null], null), cljs.core.not.call(null, c) ? lt.objs.plugins.install_button.call(null, a) : cljs.core.truth_(d) ? lt.objs.plugins.update_button.call(null, a) : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
    [new cljs.core.Keyword(null, "span.installed", "span.installed", 3622134088)], null), lt.objs.plugins.source_button.call(null, a), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h1", "h1", 1013907515), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.version", "span.version", 
    3656461734), b], null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h3", "h3", 1013907517), (new cljs.core.Keyword(null, "author", "author", 3902543101)).cljs$core$IFn$_invoke$arity$1(a)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a)], 
    null)], null);
  }()), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.uninstall_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.uninstall", "span.uninstall", 2967491248)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Uninstall plugin?", new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), "This will delete the plugin from your system, removing any local\n                                 changes you may have made, and cannot be undone."], 
    null), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete plugin", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
      return lt.objs.plugins.uninstall.call(null, a);
    }], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Cancel"], null)], null)], null));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.plugins.installed_plugin_ui = function(a) {
  for (var b = crate.core.html.call(null, function() {
    var b = (new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), cljs.core.keyword.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)))), c = cljs.core.truth_(b) ? lt.objs.deploy.is_newer_QMARK_.call(null, (new cljs.core.Keyword(null, 
    "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a), b) : null;
    return new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), cljs.core.truth_(c) ? "has-update" : null], null), cljs.core.truth_(c) ? lt.objs.plugins.update_button.call(null, cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "version", "version", 1365512266), b)) : null, lt.objs.plugins.uninstall_button.call(null, 
    a), lt.objs.plugins.source_button.call(null, a), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h1", "h1", 1013907515), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.version", "span.version", 3656461734), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(a)], 
    null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h3", "h3", 1013907517), (new cljs.core.Keyword(null, "author", "author", 3902543101)).cljs$core$IFn$_invoke$arity$1(a)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a)], null)], null);
  }()), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "plugin-manager", "lt.objs.plugins/plugin-manager", 2152899846), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "plugin-manager", "plugin-manager", 1960276613), null], null), null), new cljs.core.Keyword(null, "name", "name", 1017277949), "Plugins", new cljs.core.Keyword(null, "tab", "tab", 1014018823), new cljs.core.Keyword(null, 
"installed", "installed", 1042950892), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784), lt.objs.plugins.read_cache.call(null)], null));
  return new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
    return[cljs.core.str("plugin-manager"), cljs.core.str(cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "tab", "tab", 1014018823)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.Keyword(null, "server", "server", 4403045045)) ? " server" : null)].join("");
  })], null), lt.objs.plugins.tabs_and_search.call(null, a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.server-plugins", "ul.server-plugins", 2509222591)], null), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.plugins", "ul.plugins", 4244308667)], null)], null);
});
lt.objs.plugins.manager = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.plugins", "plugin-manager", "lt.objs.plugins/plugin-manager", 2152899846));
lt.objs.plugins.__BEH__check_local_metadata_cache = function(a, b) {
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "__sha", "__sha", 1104582718)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "metadata.updated", "metadata.updated", 1526644846)) : lt.objs.plugins.download_metadata.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "check-local-metadata-cache", "lt.objs.plugins/check-local-metadata-cache", 3873892318), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__check_local_metadata_cache, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: check local metadata cache for update", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "metadata.sha", "metadata.sha", 2333336799), null], null), null));
lt.objs.plugins.__BEH__draw_plugins_on_updated = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784), lt.objs.plugins.read_cache.call(null)], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "plugin-results", "plugin-results", 2222563022), lt.objs.plugins.all_latest.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "draw-plugins-on-updated", "lt.objs.plugins/draw-plugins-on-updated", 604527958), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__draw_plugins_on_updated, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: draw plugins on metadata update", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "metadata.updated", "metadata.updated", 1526644846), null], null), null));
lt.objs.plugins.__BEH__get_latest_metadata_sha = function(a, b) {
  return lt.objs.plugins.latest_metadata_sha.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "get-latest-metadata-sha", "lt.objs.plugins/get-latest-metadata-sha", 1607213808), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__get_latest_metadata_sha, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: get the latest metadata sha", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "fetch-plugins", "fetch-plugins", 2680814335), null], null), null));
lt.objs.plugins.__BEH__render_server_plugins = function(a, b) {
  var c = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".server-plugins", ".server-plugins", 2388894262), lt.object.__GT_content.call(null, a));
  lt.util.dom.empty.call(null, c);
  return lt.util.dom.append.call(null, c, lt.util.dom.fragment.call(null, cljs.core.map.call(null, lt.objs.plugins.server_plugin_ui, cljs.core.remove.call(null, function(a) {
    return lt.objs.plugins.installed_QMARK_.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a));
  }, b))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "render-server-plugins", "lt.objs.plugins/render-server-plugins", 797162336), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__render_server_plugins, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: render plugin results", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "plugin-results", "plugin-results", 2222563022), null], null), null));
lt.objs.plugins.__BEH__search_server_plugins = function(a, b) {
  var c = lt.objs.plugins.all_latest.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "plugin-results", "plugin-results", 2222563022), cljs.core.empty_QMARK_.call(null, b) ? c : lt.objs.plugins.search_plugins.call(null, c, b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "search-server-plugins", "lt.objs.plugins/search-server-plugins", 2575945774), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__search_server_plugins, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: search plugins", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, 
[new cljs.core.Keyword(null, "search-plugins!", "search-plugins!", 4139281016), null], null), null));
lt.objs.plugins.save_plugins = function(a) {
  var b = lt.objs.files.join.call(null, lt.objs.settings.user_plugin_dir, "plugin.edn"), c = lt.objs.settings.safe_read.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, b)), b), d = function() {
    var a = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c);
    if (!cljs.core.truth_(a)) {
      throw Error([cljs.core.str("Assert failed: "), cljs.core.str("User plugin doesn't have a :name"), cljs.core.str("\n"), cljs.core.str(cljs.core.pr_str.call(null, new cljs.core.Symbol(null, "G__10866", "G__10866", -1275038165, null)))].join(""));
    }
    return a;
  }();
  a = cljs.core.into.call(null, cljs.core.sorted_map.call(null), cljs.core.map.call(null, cljs.core.juxt.call(null, new cljs.core.Keyword(null, "name", "name", 1017277949), new cljs.core.Keyword(null, "version", "version", 1365512266)), cljs.core.remove.call(null, function(a, b, c) {
    return function(a) {
      return cljs.core.contains_QMARK_.call(null, cljs.core.PersistentHashSet.fromArray([c], !0), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a));
    };
  }(b, c, d), cljs.core.vals.call(null, a))));
  a = cljs.core.pr_str.call(null, cljs.core.assoc.call(null, c, new cljs.core.Keyword(null, "dependencies", "dependencies", 1517678747), a));
  return lt.objs.files.save.call(null, b, clojure.string.replace_first.call(null, clojure.string.replace_first.call(null, clojure.string.replace.call(null, a, /(\"\s*,|\{|\},)/, function(a) {
    return[cljs.core.str(a), cljs.core.str("\n")].join("");
  }), /^\{\n/, "{"), /:dependencies/, ";; Do not edit - :dependencies are auto-generated\n:dependencies"));
};
lt.objs.plugins.__BEH__save_user_plugin_dependencies = function() {
  var a = function(a, b) {
    return lt.objs.plugins.save_plugins.call(null, lt.objs.plugins.available_plugins.call(null));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "save-user-plugin-dependencies", "lt.objs.plugins/save-user-plugin-dependencies", 1525590204), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__save_user_plugin_dependencies, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Saves dependencies to user's plugin.edn", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.plugins.__BEH__render_installed_plugins = function() {
  var a = function(a, b) {
    var e = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, e = cljs.core.get.call(null, e, new cljs.core.Keyword(null, "ignore-missing", "ignore-missing", 2124702685));
    lt.object.merge_BANG_.call(null, lt.objs.app.app, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683), lt.objs.plugins.available_plugins.call(null)], null));
    cljs.core.truth_(e) || lt.objs.plugins.check_missing.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)));
    e = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".plugins", ".plugins", 3398138660), lt.object.__GT_content.call(null, a));
    lt.util.dom.empty.call(null, e);
    return lt.util.dom.append.call(null, e, lt.util.dom.fragment.call(null, cljs.core.map.call(null, lt.objs.plugins.installed_plugin_ui, cljs.core.sort_by.call(null, function(a) {
      return(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a).toUpperCase();
    }, cljs.core.vals.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)))))));
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "render-installed-plugins", "lt.objs.plugins/render-installed-plugins", 560702913), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__render_installed_plugins, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin Manager: refresh installed plugins", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.plugins.__BEH__on_close = function(a) {
  return lt.objs.tabs.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "on-close", "lt.objs.plugins/on-close", 1621607293), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "plugin-manager.search", "plugin-manager.search", 4116247637), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugins: Search", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  a = cljs.core.truth_(a) ? a : lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, lt.objs.plugins.manager)));
  lt.object.merge_BANG_.call(null, lt.objs.plugins.manager, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tab", "tab", 1014018823), new cljs.core.Keyword(null, "server", "server", 4403045045)], null));
  return lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "search-plugins!", "search-plugins!", 4139281016), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "plugin-manager.refresh", "plugin-manager.refresh", 1814385266), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugins: Refresh plugin list", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  return lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "fetch-plugins", "fetch-plugins", 2680814335));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "plugin-manager.show", "plugin-manager.show", 3752328298), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugins: Show plugin manager", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.objs.tabs.add_or_focus_BANG_.call(null, lt.objs.plugins.manager);
  lt.util.dom.focus.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, lt.objs.plugins.manager)));
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "plugin-manager.refresh", "plugin-manager.refresh", 1814385266));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "plugin-manager.update-outdated", "plugin-manager.update-outdated", 1387765507), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugins: Update all outdated", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  for (var a = cljs.core.filter.call(null, lt.objs.plugins.outdated_QMARK_, cljs.core.vals.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)))), b = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY), c = cljs.core.atom.call(null, cljs.core.count.call(null, a)), d = cljs.core.seq.call(null, a), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g);
      if (cljs.core.seq.call(null, a)) {
        var k = (new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(h)));
        lt.objs.plugins.discover_deps.call(null, cljs.core.assoc.call(null, h, new cljs.core.Keyword(null, "version", "version", 1365512266), k), function(a, d, e, f, g, h) {
          return function() {
            cljs.core.swap_BANG_.call(null, b, cljs.core.conj, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(h));
            cljs.core.swap_BANG_.call(null, c, cljs.core.dec);
            lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
            return 0 >= cljs.core.deref.call(null, c) ? (lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600)), lt.objs.notifos.set_msg_BANG_.call(null, cljs.core.apply.call(null, cljs.core.str, "Updated: ", cljs.core.interpose.call(null, ", ", cljs.core.deref.call(null, b))))) : null;
          };
        }(d, e, f, g, k, h));
      }
      g += 1;
    } else {
      var l = cljs.core.seq.call(null, d);
      if (l) {
        k = l;
        if (cljs.core.chunked_seq_QMARK_.call(null, k)) {
          d = cljs.core.chunk_first.call(null, k), g = cljs.core.chunk_rest.call(null, k), e = d, f = cljs.core.count.call(null, d), d = g;
        } else {
          h = cljs.core.first.call(null, k);
          if (cljs.core.seq.call(null, a)) {
            var m = (new cljs.core.Keyword(null, "latest-version", "latest-version", 1676217348)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "server-plugins", "server-plugins", 1760987784)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.plugins.manager)), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(h)));
            lt.objs.plugins.discover_deps.call(null, cljs.core.assoc.call(null, h, new cljs.core.Keyword(null, "version", "version", 1365512266), m), function(a, d, e, f, g, h, k, l) {
              return function() {
                cljs.core.swap_BANG_.call(null, b, cljs.core.conj, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(h));
                cljs.core.swap_BANG_.call(null, c, cljs.core.dec);
                lt.object.raise.call(null, lt.objs.plugins.manager, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
                return 0 >= cljs.core.deref.call(null, c) ? (lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "behaviors.reload", "behaviors.reload", 2942796600)), lt.objs.notifos.set_msg_BANG_.call(null, cljs.core.apply.call(null, cljs.core.str, "Updated: ", cljs.core.interpose.call(null, ", ", cljs.core.deref.call(null, b))))) : null;
              };
            }(d, e, f, g, m, h, k, l));
          }
          d = cljs.core.next.call(null, k);
          e = null;
          f = 0;
        }
        g = 0;
      } else {
        return null;
      }
    }
  }
}], null));
lt.objs.plugins.__BEH__init_plugins = function(a) {
  cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, lt.objs.plugins.user_plugins_dir)) || lt.objs.files.mkdir.call(null, lt.objs.plugins.user_plugins_dir);
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "create-user-plugin", "create-user-plugin", 2686594966));
  lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "flatten-map-settings", "flatten-map-settings", 3992976911));
  lt.object.merge_BANG_.call(null, lt.objs.app.app, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683), lt.objs.plugins.available_plugins.call(null)], null));
  return lt.objs.plugins.check_missing.call(null, (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.app.app)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "init-plugins", "lt.objs.plugins/init-plugins", 4096325174), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__init_plugins, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pre-load", "pre-load", 3967767874), null], null), null));
lt.objs.plugins.__BEH__behaviors__DOT__refreshed_load_keys = function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "keymaps.reload", "keymaps.reload", 666881155));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "behaviors.refreshed-load-keys", "lt.objs.plugins/behaviors.refreshed-load-keys", 1002486638), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__behaviors__DOT__refreshed_load_keys, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "behaviors.refreshed", "behaviors.refreshed", 
1338765023), null], null), null));
lt.objs.plugins.__BEH__plugin_behavior_diffs = function(a, b) {
  var c = (new cljs.core.Keyword("lt.objs.plugins", "plugins", "lt.objs.plugins/plugins", 2920328683)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = lt.objs.plugins.plugin_dependency_graph.call(null, c), e = cljs.core.seq.call(null, lt.util.kahn.kahn_sort.call(null, d)), f = e ? cljs.core.map.call(null, c, e) : cljs.core.vals.call(null, c);
  cljs.core.truth_(cljs.core.truth_(c) ? cljs.core.not.call(null, e) && cljs.core.not.call(null, (new cljs.core.Keyword("lt.objs.plugins", "cycle-warned", "lt.objs.plugins/cycle-warned", 1103523743)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : c) && (lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.plugins", "cycle-warned", "lt.objs.plugins/cycle-warned", 1103523743), !0], null)), lt.objs.popup.popup_BANG_.call(null, 
  new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "There's a cycle in your plugin dependencies.", new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), "As a result, we can't come up with an optimal way to load them.\n                                                This means there may be unexpected consequences to being loaded out of order.\n                                                Here are the plugins causing the cycle: ", 
  lt.objs.plugins.cycle_desc.call(null, lt.objs.plugins.__GT_cycles.call(null, d))], null), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "ok"], null)], null)], null)));
  return cljs.core.concat.call(null, b, cljs.core.mapv.call(null, lt.objs.plugins.plugin_behaviors, f));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "plugin-behavior-diffs", "lt.objs.plugins/plugin-behavior-diffs", 1511349728), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__plugin_behavior_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "behaviors.diffs.plugin+", "behaviors.diffs.plugin+", 2303858461), 
null], null), null));
lt.objs.plugins.__BEH__plugin_keymap_diffs = function(a, b) {
  return cljs.core.concat.call(null, b, cljs.core.filter.call(null, cljs.core.identity, cljs.core.mapv.call(null, lt.objs.settings.parse_key_file, (new cljs.core.Keyword("lt.objs.plugins", "keymaps", "lt.objs.plugins/keymaps", 4718281889)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "plugin-keymap-diffs", "lt.objs.plugins/plugin-keymap-diffs", 4431416675), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__plugin_keymap_diffs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "keymap.diffs.plugin+", "keymap.diffs.plugin+", 4109982809), null], 
null), null));
lt.objs.plugins.__BEH__load_js = function(a, b) {
  var c = lt.objs.plugins._STAR_plugin_dir_STAR_, d = lt.util.load._STAR_force_reload_STAR_;
  try {
    lt.objs.plugins._STAR_plugin_dir_STAR_ = (new cljs.core.Keyword("lt.objs.plugins", "dir", "lt.objs.plugins/dir", 3366558592)).cljs$core$IFn$_invoke$arity$1(lt.object._STAR_behavior_meta_STAR_);
    lt.util.load._STAR_force_reload_STAR_ = (new cljs.core.Keyword("lt.objs.plugins", "force-reload", "lt.objs.plugins/force-reload", 4731263182)).cljs$core$IFn$_invoke$arity$1(lt.object._STAR_behavior_meta_STAR_);
    for (var e = cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), f = cljs.core.seq.call(null, e), e = null, g = 0, h = 0;;) {
      if (h < g) {
        var k = cljs.core._nth.call(null, e, h), l = lt.objs.plugins.adjust_path.call(null, k);
        if (cljs.core.truth_(function() {
          var b = lt.util.load._STAR_force_reload_STAR_;
          return cljs.core.truth_(b) ? b : cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), l));
        }())) {
          try {
            lt.util.load.js.call(null, l, !0), lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)], null), function(a, b, c, d, e, f) {
              return function(a) {
                return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, e);
              };
            }(f, e, g, h, l, k));
          } catch (m) {
            var n = m;
            lt.objs.console.error.call(null, [cljs.core.str("Error loading JS file: "), cljs.core.str(l), cljs.core.str(" : "), cljs.core.str(n)].join(""), n);
          }
        }
        h += 1;
      } else {
        var p = cljs.core.seq.call(null, f);
        if (p) {
          n = p;
          if (cljs.core.chunked_seq_QMARK_.call(null, n)) {
            var q = cljs.core.chunk_first.call(null, n), r = cljs.core.chunk_rest.call(null, n), n = q, s = cljs.core.count.call(null, q), f = r, e = n, g = s
          } else {
            var k = cljs.core.first.call(null, n), t = lt.objs.plugins.adjust_path.call(null, k);
            if (cljs.core.truth_(function() {
              var b = lt.util.load._STAR_force_reload_STAR_;
              return cljs.core.truth_(b) ? b : cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), t));
            }())) {
              try {
                lt.util.load.js.call(null, t, !0), lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)], null), function(a, b, c, d, e, f, g, h) {
                  return function(a) {
                    return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, e);
                  };
                }(f, e, g, h, t, k, n, p));
              } catch (v) {
                var u = v;
                lt.objs.console.error.call(null, [cljs.core.str("Error loading JS file: "), cljs.core.str(t), cljs.core.str(" : "), cljs.core.str(u)].join(""), u);
              }
            }
            f = cljs.core.next.call(null, n);
            e = null;
            g = 0;
          }
          h = 0;
        } else {
          return null;
        }
      }
    }
  } finally {
    lt.util.load._STAR_force_reload_STAR_ = d, lt.objs.plugins._STAR_plugin_dir_STAR_ = c;
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "load-js", "lt.objs.plugins/load-js", 3701155451), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__load_js, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Load javascript file(s)", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "path(s)"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant-load", "object.instant-load", 4025433875), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.plugins.__BEH__load_css = function(a, b) {
  for (var c = cljs.core.map.call(null, lt.objs.plugins.adjust_path, cljs.core.coll_QMARK_.call(null, b) ? b : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null)), c = cljs.core.seq.call(null, c), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      cljs.core.truth_(function() {
        var b = lt.util.load._STAR_force_reload_STAR_;
        return cljs.core.truth_(b) ? b : cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), g));
      }()) && (lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)], null), function(a, b, c, d, e) {
        return function(a) {
          return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, e);
        };
      }(c, d, e, f, g)), lt.util.load.css.call(null, g));
      f += 1;
    } else {
      var h = cljs.core.seq.call(null, c);
      if (h) {
        var k = h;
        cljs.core.chunked_seq_QMARK_.call(null, k) ? (c = cljs.core.chunk_first.call(null, k), e = cljs.core.chunk_rest.call(null, k), d = c, k = cljs.core.count.call(null, c), c = e, e = k) : (g = cljs.core.first.call(null, k), cljs.core.truth_(function() {
          var b = lt.util.load._STAR_force_reload_STAR_;
          return cljs.core.truth_(b) ? b : cljs.core.not.call(null, cljs.core.get.call(null, (new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), g));
        }()) && (lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "loaded-files", "lt.objs.plugins/loaded-files", 2343697626)], null), function(a, b, c, d, e, f, g) {
          return function(a) {
            return cljs.core.conj.call(null, cljs.core.truth_(a) ? a : cljs.core.PersistentHashSet.EMPTY, e);
          };
        }(c, d, e, f, g, k, h)), lt.util.load.css.call(null, g)), c = cljs.core.next.call(null, k), d = null, e = 0);
        f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "load-css", "lt.objs.plugins/load-css", 934792943), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__load_css, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Load css file(s)", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "path(s)"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.plugins.__BEH__load_keymap = function(a, b) {
  var c = lt.objs.plugins.adjust_path.call(null, b);
  return cljs.core.truth_((new cljs.core.Keyword("lt.objs.plugins", "keymaps", "lt.objs.plugins/keymaps", 4718281889)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "keymaps", "lt.objs.plugins/keymaps", 4718281889)], null), cljs.core.conj, c) : lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, 
  [new cljs.core.Keyword("lt.objs.plugins", "keymaps", "lt.objs.plugins/keymaps", 4718281889), cljs.core.PersistentHashSet.fromArray([c], !0)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "load-keymap", "lt.objs.plugins/load-keymap", 1368994999), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__load_keymap, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Load a keymap file", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "path"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.plugins.__BEH__check_for_plugin_file = function(a) {
  var b = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  var c = lt.objs.files.walk_up_find.call(null, b, "plugin.json"), b = cljs.core.truth_(c) ? c : lt.objs.files.walk_up_find.call(null, b, "plugin.edn");
  return cljs.core.truth_(b) ? (lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.objs.plugins", "plugin-path", "lt.objs.plugins/plugin-path", 2063828362), lt.objs.files.parent.call(null, b)], null)), lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "plugin.file", "plugin.file", 1865693897)], null))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.plugins", "check-for-plugin-file", "lt.objs.plugins/check-for-plugin-file", 3384140800), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.plugins.__BEH__check_for_plugin_file, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Plugin: Determine if this is a plugin file", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "create", "create", 3956577390), null], null), null));
lt.object.tag_behaviors.call(null, new cljs.core.Keyword(null, "app", "app", 1014001043), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.plugins", "init-plugins", "lt.objs.plugins/init-plugins", 4096325174), new cljs.core.Keyword("lt.objs.plugins", "plugin-behavior-diffs", "lt.objs.plugins/plugin-behavior-diffs", 1511349728), new cljs.core.Keyword("lt.objs.plugins", "plugin-keymap-diffs", "lt.objs.plugins/plugin-keymap-diffs", 4431416675)], 
null));
lt.objs.style = {};
lt.objs.style.css_expr = function(a, b) {
  return[cljs.core.str(cljs.core.name.call(null, a)), cljs.core.str(":"), cljs.core.str(b), cljs.core.str(" !important; ")].join("");
};
lt.objs.style.selector = function() {
  var a = function(a, b) {
    return[cljs.core.str(a), cljs.core.str(" { "), cljs.core.str(cljs.core.apply.call(null, cljs.core.str, b)), cljs.core.str(" }")].join("");
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.style.str_font_family = function(a) {
  return cljs.core.vector_QMARK_.call(null, a) ? clojure.string.join.call(null, ", ", cljs.core.map.call(null, cljs.core.pr_str, a)) : cljs.core.pr_str.call(null, a);
};
lt.objs.style.__GT_css = function(a) {
  return lt.objs.style.selector.call(null, ".CodeMirror", cljs.core.truth_((new cljs.core.Keyword(null, "line-height", "line-height", 4093191314)).cljs$core$IFn$_invoke$arity$1(a)) ? lt.objs.style.css_expr.call(null, new cljs.core.Keyword(null, "line-height", "line-height", 4093191314), [cljs.core.str((new cljs.core.Keyword(null, "line-height", "line-height", 4093191314)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str("em")].join("")) : null, cljs.core.truth_((new cljs.core.Keyword(null, "font-family", 
  "font-family", 1122436628)).cljs$core$IFn$_invoke$arity$1(a)) ? lt.objs.style.css_expr.call(null, new cljs.core.Keyword(null, "font-family", "font-family", 1122436628), lt.objs.style.str_font_family.call(null, (new cljs.core.Keyword(null, "font-family", "font-family", 1122436628)).cljs$core$IFn$_invoke$arity$1(a))) : null, cljs.core.truth_((new cljs.core.Keyword(null, "font-size", "font-size", 3722789425)).cljs$core$IFn$_invoke$arity$1(a)) ? lt.objs.style.css_expr.call(null, new cljs.core.Keyword(null, 
  "font-size", "font-size", 3722789425), [cljs.core.str((new cljs.core.Keyword(null, "font-size", "font-size", 3722789425)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str("pt")].join("")) : null);
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "styles", "lt.objs.style/styles", 4248302786), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text/css"], null), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, 
  "font-settings", "font-settings", 2881523539)), lt.objs.style.__GT_css)], null)], null);
});
lt.objs.style.styles = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.style", "styles", "lt.objs.style/styles", 4248302786), new cljs.core.Keyword(null, "theme", "theme", 1124231483), "default");
lt.objs.style.__BEH__style_on_init = function(a) {
  return lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "head", "head", 1017102674)), (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "style-on-init", "lt.objs.style/style-on-init", 2794998146), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__style_on_init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.style.__BEH__font_settings = function(a, b, c, d) {
  a = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "font-family", "font-family", 1122436628), b], null);
  c = cljs.core.truth_(c) ? cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "font-size", "font-size", 3722789425), c) : a;
  d = cljs.core.truth_(cljs.core.truth_(d) ? 0 < d : d) ? cljs.core.assoc.call(null, c, new cljs.core.Keyword(null, "line-height", "line-height", 4093191314), d) : c;
  return lt.object.merge_BANG_.call(null, lt.objs.style.styles, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "font-settings", "font-settings", 2881523539), d], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "font-settings", "lt.objs.style/font-settings", 3603362247), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__font_settings, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Font settings", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, 
[new cljs.core.Keyword(null, "label", "label", 1116631654), "Font family", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "string", "string", 4416885635)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Size (pt)", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "number", "number", 4274507451)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "Line height (em)", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "number", "number", 4274507451)], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.style.load_skin = function(a) {
  var b = lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "skins+", "skins+", 4408310727), cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.get.call(null, b, a, lt.objs.plugins.adjust_path.call(null, "core/css/skins/new-dark.css")), b = lt.util.load.css.call(null, b);
  crate.compiler.dom_attr.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "id", "id", 1013907597), [cljs.core.str("skin-"), cljs.core.str(a)].join("")], null));
  return b;
};
lt.objs.style.inject_skin = function(a) {
  cljs.core.truth_((new cljs.core.Keyword(null, "skin", "skin", 1017436399)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles))) && (lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), [cljs.core.str("skin-"), cljs.core.str((new cljs.core.Keyword(null, "skin", "skin", 1017436399)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles)))].join("")), lt.util.dom.remove.call(null, 
  lt.util.dom.$.call(null, [cljs.core.str("#skin-"), cljs.core.str((new cljs.core.Keyword(null, "skin", "skin", 1017436399)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles)))].join(""))));
  lt.object.merge_BANG_.call(null, lt.objs.style.styles, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "skin", "skin", 1017436399), a], null));
  lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), [cljs.core.str("skin-"), cljs.core.str(a)].join(""));
  return cljs.core.truth_(lt.util.dom.$.call(null, [cljs.core.str("#skin-"), cljs.core.str(a)].join(""))) ? null : lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "head", "head", 1017102674)), lt.objs.style.load_skin.call(null, a));
};
lt.objs.style.get_skins = function() {
  return cljs.core.sort_by.call(null, function(a) {
    return a.text;
  }, function() {
    return function b(c) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var d = cljs.core.seq.call(null, c);
          if (d) {
            if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
              var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f);
              a: {
                for (var h = 0;;) {
                  if (h < f) {
                    var k = cljs.core._nth.call(null, e, h), l = cljs.core.nth.call(null, k, 0, null);
                    cljs.core.nth.call(null, k, 1, null);
                    cljs.core.chunk_append.call(null, g, {completion:cljs.core.pr_str.call(null, l), text:cljs.core.pr_str.call(null, l)});
                    h += 1;
                  } else {
                    e = !0;
                    break a;
                  }
                }
                e = void 0;
              }
              return e ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), b.call(null, cljs.core.chunk_rest.call(null, d))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), null);
            }
            g = cljs.core.first.call(null, d);
            e = cljs.core.nth.call(null, g, 0, null);
            cljs.core.nth.call(null, g, 1, null);
            return cljs.core.cons.call(null, {completion:cljs.core.pr_str.call(null, e), text:cljs.core.pr_str.call(null, e)}, b.call(null, cljs.core.rest.call(null, d)));
          }
          return null;
        }
      }, null, null);
    }.call(null, lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "skins+", "skins+", 4408310727), cljs.core.PersistentArrayMap.EMPTY));
  }());
};
lt.objs.style.__BEH__set_skin = function(a, b) {
  return lt.objs.style.inject_skin.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "set-skin", "lt.objs.style/set-skin", 3308326384), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__set_skin, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Style: Set Light Table skin", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "skin", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "list", "list", 1017226256), new cljs.core.Keyword(null, "items", "items", 1114430258), lt.objs.style.get_skins], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, 
"type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.style.__BEH__provide_skin = function(a, b, c, d) {
  return cljs.core.assoc.call(null, b, c, lt.objs.plugins.adjust_path.call(null, d));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "provide-skin", "lt.objs.style/provide-skin", 1388875919), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__provide_skin, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Style: Provide skin", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "name"], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "path"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "skins+", "skins+", 4408310727), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 
1017503549));
lt.objs.style.load_theme = function(a) {
  var b = lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "themes+", "themes+", 3959171347), cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.get.call(null, b, a, lt.objs.plugins.adjust_path.call(null, "core/css/themes/default.css")), b = lt.util.load.css.call(null, b);
  crate.compiler.dom_attr.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "id", "id", 1013907597), [cljs.core.str("theme-"), cljs.core.str(a)].join("")], null));
  return b;
};
lt.objs.style.inject_theme = function(a) {
  cljs.core.truth_((new cljs.core.Keyword(null, "theme", "theme", 1124231483)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles))) && lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#multi", "#multi", 2120181352)), [cljs.core.str("theme-"), cljs.core.str((new cljs.core.Keyword(null, "theme", "theme", 1124231483)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles)))].join(""));
  lt.object.merge_BANG_.call(null, lt.objs.style.styles, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "theme", "theme", 1124231483), a], null));
  lt.util.dom.add_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#multi", "#multi", 2120181352)), [cljs.core.str("theme-"), cljs.core.str(a)].join(""));
  return cljs.core.truth_(lt.util.dom.$.call(null, [cljs.core.str("#theme-"), cljs.core.str(a)].join(""))) ? null : lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "head", "head", 1017102674)), lt.objs.style.load_theme.call(null, a));
};
lt.objs.style.get_themes = function() {
  return cljs.core.sort_by.call(null, function(a) {
    return a.text;
  }, function() {
    return function b(c) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var d = cljs.core.seq.call(null, c);
          if (d) {
            if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
              var e = cljs.core.chunk_first.call(null, d), f = cljs.core.count.call(null, e), g = cljs.core.chunk_buffer.call(null, f);
              a: {
                for (var h = 0;;) {
                  if (h < f) {
                    var k = cljs.core._nth.call(null, e, h), l = cljs.core.nth.call(null, k, 0, null);
                    cljs.core.nth.call(null, k, 1, null);
                    cljs.core.chunk_append.call(null, g, {completion:cljs.core.pr_str.call(null, l), text:cljs.core.pr_str.call(null, l)});
                    h += 1;
                  } else {
                    e = !0;
                    break a;
                  }
                }
                e = void 0;
              }
              return e ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), b.call(null, cljs.core.chunk_rest.call(null, d))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, g), null);
            }
            g = cljs.core.first.call(null, d);
            e = cljs.core.nth.call(null, g, 0, null);
            cljs.core.nth.call(null, g, 1, null);
            return cljs.core.cons.call(null, {completion:cljs.core.pr_str.call(null, e), text:cljs.core.pr_str.call(null, e)}, b.call(null, cljs.core.rest.call(null, d)));
          }
          return null;
        }
      }, null, null);
    }.call(null, lt.object.raise_reduce.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "themes+", "themes+", 3959171347), cljs.core.PersistentArrayMap.EMPTY));
  }());
};
lt.objs.style.__BEH__provide_theme = function(a, b, c, d) {
  return cljs.core.assoc.call(null, b, c, lt.objs.plugins.adjust_path.call(null, d));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "provide-theme", "lt.objs.style/provide-theme", 2972479995), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__provide_theme, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Style: Provide editor theme", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "name"], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "path"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "themes+", "themes+", 3959171347), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.objs.style.__BEH__remove_theme = function(a) {
  return cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, lt.objs.tabs.active_tab.call(null), new cljs.core.Keyword(null, "editor", "editor", 4001043679))) ? null : cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "theme", "theme", 1124231483)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles))) ? null : lt.util.dom.remove_class.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "#multi", "#multi", 2120181352)), [cljs.core.str("theme-"), 
  cljs.core.str((new cljs.core.Keyword(null, "theme", "theme", 1124231483)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.style.styles)))].join(""));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "remove-theme", "lt.objs.style/remove-theme", 3150661288), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__remove_theme, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null, new cljs.core.Keyword(null, "deactivated", "deactivated", 
3538760162), null], null), null));
lt.objs.style.__BEH__set_theme = function(a, b) {
  lt.objs.style.inject_theme.call(null, b);
  return lt.objs.editor.set_options.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "theme", "theme", 1124231483), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.style", "set-theme", "lt.objs.style/set-theme", 1439387910), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.style.__BEH__set_theme, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Style: Set the editor theme", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, 
"label", "label", 1116631654), "theme", new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "list", "list", 1017226256), new cljs.core.Keyword(null, "items", "items", 1114430258), lt.objs.style.get_themes], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null, new cljs.core.Keyword(null, 
"show", "show", 1017433711), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.file = {};
lt.objs.editor.file.__BEH__file_save = function(a) {
  var b = cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "info", "info", 1017141280)), b = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, b = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "path", "path", 1017337751)), c = lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "save+", "save+", 1123115456), lt.objs.editor.__GT_val.call(null, a));
  if (cljs.core.not_EQ_.call(null, c, lt.objs.editor.__GT_val.call(null, a))) {
    var d = lt.objs.editor.__GT_cm_ed.call(null, a).getScrollInfo().top;
    lt.objs.editor.set_val_and_keep_cursor.call(null, a, c);
    lt.objs.editor.scroll_to.call(null, a, 0, d);
  }
  return lt.objs.document.save.call(null, b, c, function() {
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !1, new cljs.core.Keyword(null, "editor.generation", "editor.generation", 4482163627), lt.objs.editor.__GT_generation.call(null, a)], null));
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "saved", "saved", 1123115513));
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clean", "clean", 1108650427));
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "file-save", "lt.objs.editor.file/file-save", 3045255915), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__file_save, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save", "save", 1017427183), null], null), null));
lt.objs.editor.file.__BEH__dirty_on_change = function(a) {
  var b = lt.objs.editor.dirty_QMARK_.call(null, a, (new cljs.core.Keyword(null, "editor.generation", "editor.generation", 4482163627)).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null, a), 0));
  if (cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b)) {
    if (b) {
      return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !0], null)), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "dirty", "dirty", 1109497668));
    }
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !1], null));
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clean", "clean", 1108650427));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "dirty-on-change", "lt.objs.editor.file/dirty-on-change", 4496637698), new cljs.core.Keyword(null, "throttle", "throttle", 2497347228), 100, new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__dirty_on_change, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"change", "change", 3947235106), null], null), null));
lt.objs.editor.file.__BEH__preserve_line_endings = function(a, b) {
  return cljs.core._EQ_.call(null, "\r\n", function() {
    var b = (new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    return cljs.core.truth_(b) ? b : lt.objs.files.line_ending;
  }()) ? clojure.string.replace.call(null, b, RegExp("(\r?\n|\n)", "gm"), "\r\n") : b;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "preserve-line-endings", "lt.objs.editor.file/preserve-line-endings", 3854199025), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__preserve_line_endings, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save+", "save+", 1123115456), null], null), null));
lt.objs.editor.file.__BEH__remove_trailing_whitespace = function(a, b) {
  return b.replace(RegExp("[ \\t]+$", "gm"), "");
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "remove-trailing-whitespace", "lt.objs.editor.file/remove-trailing-whitespace", 1399383588), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__remove_trailing_whitespace, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Save: Remove trailing whitespace", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "save+", "save+", 1123115456), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.file.__BEH__last_char_newline = function(a, b) {
  var c = (new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return cljs.core._EQ_.call(null, cljs.core.last.call(null, b), "\n") ? b : [cljs.core.str(b), cljs.core.str(c)].join("");
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "last-char-newline", "lt.objs.editor.file/last-char-newline", 3282907185), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__last_char_newline, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Save: Ensure the file ends with a new-line", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "save+", "save+", 1123115456), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.editor.file.__BEH__on_save = function() {
  var a = function(a, b, e) {
    return cljs.core.apply.call(null, lt.objs.command.exec_BANG_, b, e);
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.editor.file", "on-save", "lt.objs.editor.file/on-save", 4413429866), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.editor.file.__BEH__on_save, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: On save execute command", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "command"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save", "save", 1017427183), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.dialogs = {};
lt.objs.dialogs.remote = require("remote");
lt.objs.dialogs.dialog = lt.objs.dialogs.remote.require("dialog");
lt.objs.dialogs.dir = function(a, b) {
  for (var c = lt.objs.dialogs.dialog.showOpenDialog(lt.objs.app.win, {properties:["openDirectory", "multiSelections"]}), c = cljs.core.seq.call(null, c), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      lt.object.raise.call(null, a, b, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = e, e = g) : (g = cljs.core.first.call(null, d), lt.object.raise.call(null, a, b, g), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.dialogs.file = function(a, b) {
  for (var c = lt.objs.dialogs.dialog.showOpenDialog(lt.objs.app.win, {properties:["openFile", "multiSelections"]}), c = cljs.core.seq.call(null, c), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f);
      lt.object.raise.call(null, a, b, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), e = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = e, e = g) : (g = cljs.core.first.call(null, d), lt.object.raise.call(null, a, b, g), c = cljs.core.next.call(null, d), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.dialogs.save_as = function(a, b, c) {
  c = lt.objs.dialogs.dialog.showSaveDialog(lt.objs.app.win, {defaultPath:c});
  return cljs.core.truth_(c) ? lt.object.raise.call(null, a, b, c) : null;
};
lt.objs.opener = {};
lt.objs.opener.path__GT_info = function(a) {
  if (cljs.core.truth_(a)) {
    var b = lt.objs.files.path__GT_type.call(null, a);
    return new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.files.basename.call(null, a), new cljs.core.Keyword(null, "type-name", "type-name", 1486910640), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "path", "path", 1017337751), a, new cljs.core.Keyword(null, "mime", "mime", 1017255846), (new cljs.core.Keyword(null, "mime", "mime", 1017255846)).cljs$core$IFn$_invoke$arity$1(b), 
    new cljs.core.Keyword(null, "tags", "tags", 1017456523), (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(b)], null);
  }
  return null;
};
lt.objs.opener.untitled_count = cljs.core.atom.call(null, 0);
lt.objs.opener.__BEH__open_transient_editor = function(a, b, c) {
  lt.objs.editor.pool.last_active.call(null);
  b = cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "mime", "mime", 1017255846), "plaintext", new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.plaintext", "editor.plaintext", 4474629672)], null), new cljs.core.Keyword(null, "name", "name", 1017277949), [cljs.core.str("untitled-"), cljs.core.str(cljs.core.swap_BANG_.call(null, 
  lt.objs.opener.untitled_count, cljs.core.inc))].join("")], null), lt.objs.opener.path__GT_info.call(null, b));
  b = lt.objs.editor.pool.create.call(null, b);
  lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.transient", "editor.transient", 3554141883)], null));
  lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), c], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "open", "open", 1017321916), b);
  lt.objs.tabs.add_BANG_.call(null, b);
  return lt.objs.tabs.active_BANG_.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "open-transient-editor", "lt.objs.opener/open-transient-editor", 565416896), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__open_transient_editor, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "new!", "new!", 1017282035), null], null), null));
lt.objs.opener.__BEH__transient_save = function(a) {
  var b = function() {
    var a = cljs.core.first.call(null, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)));
    return cljs.core.truth_(a) ? a : lt.objs.files.home.call(null);
  }(), c = (new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c), e = function() {
    var a = (new cljs.core.Keyword(null, "exts", "exts", 1017032164)).cljs$core$IFn$_invoke$arity$1(c);
    return cljs.core.truth_(a) ? [cljs.core.str("."), cljs.core.str(cljs.core.name.call(null, cljs.core.first.call(null, a)))].join("") : null;
  }();
  return lt.objs.dialogs.save_as.call(null, a, new cljs.core.Keyword(null, "save-as!", "save-as!", 3235093841), lt.objs.files.join.call(null, b, [cljs.core.str(d), cljs.core.str(e)].join("")));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "transient-save", "lt.objs.opener/transient-save", 1543824427), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__transient_save, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "save-as-rename!", "save-as-rename!", 4344908746), null, new cljs.core.Keyword(null, 
"save", "save", 1017427183), null], null), null));
lt.objs.opener.__BEH__save_as_rename_BANG_ = function(a) {
  return lt.objs.dialogs.save_as.call(null, a, new cljs.core.Keyword(null, "save-as!", "save-as!", 3235093841), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "save-as-rename!", "lt.objs.opener/save-as-rename!", 2578562723), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__save_as_rename_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save-as-rename!", "save-as-rename!", 4344908746), null], null), null));
lt.objs.opener.__BEH__save_as = function(a, b) {
  if (cljs.core.empty_QMARK_.call(null, b)) {
    return null;
  }
  var c = lt.objs.files.path__GT_type.call(null, b), d = (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), e = lt.objs.files.path__GT_mode.call(null, b), f = lt.objs.document.create.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "doc", "doc", 1014003882), lt.objs.editor.get_doc.call(null, a), new cljs.core.Keyword(null, 
  "line-ending", "line-ending", 4015468690), lt.objs.files.line_ending, new cljs.core.Keyword(null, "mtime", "mtime", 1118128172), lt.objs.files.stats.call(null, b), new cljs.core.Keyword(null, "mime", "mime", 1017255846), e], null));
  cljs.core.truth_((new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && lt.object.raise.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "close.force", "close.force", 4409585383));
  lt.objs.document.register_doc.call(null, f, b);
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280)], null), cljs.core.merge, lt.objs.opener.path__GT_info.call(null, b));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "dirty", "dirty", 1109497668), !0, new cljs.core.Keyword(null, "doc", "doc", 1014003882), f], null));
  lt.objs.editor.set_mode.call(null, a, e);
  lt.object.remove_tags.call(null, a, cljs.core.conj.call(null, d, new cljs.core.Keyword(null, "editor.transient", "editor.transient", 3554141883)));
  lt.object.add_tags.call(null, a, cljs.core.conj.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "editor.file-backed", "editor.file-backed", 4684256680)));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save-as", "save-as", 2886670836));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save", "save", 1017427183));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "save-as", "lt.objs.opener/save-as", 1078379657), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__save_as, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "save-as!", "save-as!", 3235093841), null], null), null));
lt.objs.opener.__BEH__check_read_only = function(a, b) {
  var c = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  return cljs.core.truth_(c) ? cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, c)) ? cljs.core.truth_(lt.objs.files.writable_QMARK_.call(null, c)) ? null : lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.read-only", "editor.read-only", 1341634996)], null)) : null : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "check-read-only", "lt.objs.opener/check-read-only", 1331582981), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__check_read_only, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Opener: check if file is read only", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"open", "open", 1017321916), null], null), null));
lt.objs.opener.__BEH__open_from_info = function(a, b) {
  var c = lt.objs.editor.pool.create.call(null, b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "open", "open", 1017321916), c);
  lt.objs.tabs.add_BANG_.call(null, c);
  return lt.objs.tabs.active_BANG_.call(null, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "open-from-info", "lt.objs.opener/open-from-info", 4587616757), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__open_from_info, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open-info!", "open-info!", 4559273826), null], null), null));
lt.objs.opener.open_path_STAR_ = function(a, b, c) {
  return a.call(null, c, function(a) {
    var e = lt.objs.files.path__GT_type.call(null, c);
    a = lt.objs.editor.pool.create.call(null, cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "doc", "doc", 1014003882), a, new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690), (new cljs.core.Keyword(null, "line-ending", "line-ending", 4015468690)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], null), lt.objs.opener.path__GT_info.call(null, c)));
    lt.objs.metrics.capture_BANG_.call(null, new cljs.core.Keyword(null, "editor.open", "editor.open", 4270591389), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), function() {
      var a = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(e);
      return cljs.core.truth_(a) ? a : lt.objs.files.ext.call(null, c);
    }(), new cljs.core.Keyword(null, "lines", "lines", 1116881521), lt.objs.editor.last_line.call(null, a)], null));
    lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.file-backed", "editor.file-backed", 4684256680)], null));
    lt.object.raise.call(null, b, new cljs.core.Keyword(null, "open", "open", 1017321916), a);
    lt.objs.tabs.add_BANG_.call(null, a);
    return lt.objs.tabs.active_BANG_.call(null, a);
  });
};
lt.objs.opener.open_path = cljs.core.partial.call(null, lt.objs.opener.open_path_STAR_, lt.objs.document.open);
lt.objs.opener.open_linked_path = function(a, b, c, d) {
  return lt.objs.opener.open_path_STAR_.call(null, cljs.core.partial.call(null, lt.objs.document.linked_open, a, d), b, c);
};
lt.objs.opener.__BEH__existing_path_opens_linked_doc = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open-linked-doc", "open-linked-doc", 3889050201), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "existing-path-opens-linked-doc", "lt.objs.opener/existing-path-opens-linked-doc", 3110254293), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__existing_path_opens_linked_doc, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Doc: Open a linked document when the file is already opened", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, 
new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), !0);
lt.objs.opener.__BEH__open_standard_editor = function(a, b) {
  if (cljs.core.not.call(null, lt.objs.files.file_QMARK_.call(null, b))) {
    return cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, b)) ? lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Cannot open a directory: "), cljs.core.str(b)].join("")) : lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("No such file: "), cljs.core.str(b)].join(""));
  }
  var c = lt.objs.files.resolve.call(null, lt.objs.files.cwd, b), d = cljs.core.first.call(null, lt.objs.editor.pool.by_path.call(null, c));
  return cljs.core.truth_(d) ? cljs.core.truth_((new cljs.core.Keyword(null, "open-linked-doc", "open-linked-doc", 3889050201)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.objs.opener.open_linked_path.call(null, d, a, c, cljs.core.PersistentArrayMap.EMPTY) : lt.objs.tabs.active_BANG_.call(null, d) : lt.objs.opener.open_path.call(null, a, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "open-standard-editor", "lt.objs.opener/open-standard-editor", 3476080129), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__open_standard_editor, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", "open!", 1119852169), null], null), null));
lt.objs.opener.__BEH__track_open_files = function(a, b) {
  var c = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  return cljs.core.truth_(c) ? lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "open-files", "open-files", 4556359846)], null), cljs.core.conj, c) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "track-open-files", "lt.objs.opener/track-open-files", 4794255357), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__track_open_files, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), null], null), null));
lt.objs.opener.__BEH__untrack_closed = function(a) {
  var b = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return cljs.core.truth_(b) ? lt.object.update_BANG_.call(null, lt.objs.opener.opener, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "open-files", "open-files", 4556359846)], null), cljs.core.disj, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "untrack-closed", "lt.objs.opener/untrack-closed", 1646138836), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__untrack_closed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null], null), null));
lt.objs.opener.__BEH__unwatch_closed = function(a) {
  var b = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return cljs.core.truth_(b) ? lt.objs.workspace.unwatch_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "unwatch-closed", "lt.objs.opener/unwatch-closed", 3293767120), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__unwatch_closed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close.force", "close.force", 4409585383), null], null), null));
lt.objs.opener.__BEH__watch_on_open = function(a, b) {
  var c = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  return cljs.core.truth_(c) ? lt.objs.workspace.watch_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "watch-on-open", "lt.objs.opener/watch-on-open", 2046768257), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__watch_on_open, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), null], null), null));
lt.objs.opener.__BEH__watch_open_files = function(a, b) {
  return cljs.core.concat.call(null, b, (new cljs.core.Keyword(null, "open-files", "open-files", 4556359846)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.opener.opener)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "watch-open-files", "lt.objs.opener/watch-open-files", 877081081), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__watch_open_files, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watch-paths+", "watch-paths+", 2265407277), null], null), null));
lt.objs.opener.__BEH__save_on_focus_lost = function(a) {
  return cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "editor", "editor", 4001043679))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save", "save", 1017427183)) : lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "save", "save", 1017427183));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "save-on-focus-lost", "lt.objs.opener/save-on-focus-lost", 1020338596), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__save_on_focus_lost, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Save on focus lost", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"blur", "blur", 1016931289), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.opener.__BEH__save_all_on_focus_lost = function(a) {
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "save-all", "save-all", 3235093699));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "save-all-on-focus-lost", "lt.objs.opener/save-all-on-focus-lost", 915651832), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__save_all_on_focus_lost, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Save all on focus lost", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, 
[new cljs.core.Keyword(null, "blur", "blur", 1016931289), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.opener.__BEH__save_failed = function(a, b, c) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), [cljs.core.str("Failed to save: "), cljs.core.str(lt.objs.files.basename.call(null, b))].join(""), new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), cljs.core.truth_(c) ? "" + cljs.core.str(c) : null], null), 
  new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "cancel"], null)], null)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "save-failed", "lt.objs.opener/save-failed", 2586027158), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.opener.__BEH__save_failed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "files.save.error", "files.save.error", 2424546720), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.opener", "opener", "lt.objs.opener/opener", 2624228996), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "opener", "opener", 4298292201), null], null), null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "open-files", "open-files", 4556359846), 
cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.opener", "open-standard-editor", "lt.objs.opener/open-standard-editor", 3476080129)], null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return null;
});
lt.objs.opener.opener = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.opener", "opener", "lt.objs.opener/opener", 2624228996));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "new-file", "new-file", 2344641787), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: New file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "new!", "new!", 1017282035), null, a);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "open-file", "open-file", 2513650321), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Open file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.dialogs.file.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Open path", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), a);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "save", "save", 1017427183), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Save file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save", "save", 1017427183)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "save-all", "save-all", 3235093699), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Save all", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  for (var a = cljs.core.seq.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "editor.file-backed", "editor.file-backed", 4684256680))), b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, e))) && lt.object.raise.call(null, e, new cljs.core.Keyword(null, "save", "save", 1017427183));
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), cljs.core.truth_((new cljs.core.Keyword(null, "dirty", "dirty", 1109497668)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, e))) && lt.object.raise.call(null, e, new cljs.core.Keyword(null, "save", "save", 1017427183)), a = cljs.core.next.call(null, b), b = 
        null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "save-as", "save-as", 2886670836), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Save file as..", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "save-as-rename!", "save-as-rename!", 4344908746)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "opener.open-info", "opener.open-info", 2298471692), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Opener: open info", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open-info!", "open-info!", 4559273826), a);
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "opener.open-linked-doc", "opener.open-linked-doc", 2184055522), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "File: Open another view of current file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return lt.objs.opener.open_linked_path.call(null, a, lt.objs.opener.opener, cljs.core.get_in.call(null, cljs.core.deref.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "info", "info", 1017141280), new cljs.core.Keyword(null, "path", "path", 1017337751)], null)), cljs.core.PersistentArrayMap.EMPTY);
}], null));
window.ondrop = function(a) {
  try {
    for (var b = a.dataTransfer.files.length, c = 0;;) {
      if (c < b) {
        lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), a.dataTransfer.files[c].path), c += 1;
      } else {
        return null;
      }
    }
  } catch (d) {
    return lt.objs.console.error.call(null, d);
  }
};
lt.objs.cli = {};
lt.objs.cli.remote = require("remote");
lt.objs.cli.open_paths = function(a, b) {
  for (var c = cljs.core.seq.call(null, a), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      cljs.core.not_EQ_.call(null, h, process.execPath) && (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, h)) ? cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, h)) ? lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), h) : (lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), h), cljs.core.truth_(g) && lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, 
      "goto-line", "goto-line", 2802035088), g), cljs.core.truth_(b) && lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.file!", "add.file!", 4237252106), h)) : lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "new!", "new!", 1017282035), h));
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (d = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), h = d, e = cljs.core.count.call(null, d), d = h) : (d = cljs.core.first.call(null, c), h = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null), cljs.core.not_EQ_.call(null, h, process.execPath) && (cljs.core.truth_(lt.objs.files.exists_QMARK_.call(null, h)) ? cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, h)) ? lt.object.raise.call(null, 
        lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), h) : (lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), h), cljs.core.truth_(g) && lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "goto-line", "goto-line", 2802035088), g), cljs.core.truth_(b) && lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.file!", "add.file!", 4237252106), 
        h)) : lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "new!", "new!", 1017282035), h)), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.cli.parsed_args = cljs.core.js__GT_clj.call(null, lt.objs.cli.remote.getGlobal("browserParsedArgs"), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
lt.objs.cli.open_files = cljs.core.js__GT_clj.call(null, lt.objs.cli.remote.getGlobal("browserOpenFiles"));
lt.objs.cli.argv = cljs.core.js__GT_clj.call(null, lt.objs.cli.remote.process.argv);
lt.util.ipc.on.call(null, "openFileAfterStartup", function(a) {
  return lt.object.raise.call(null, lt.objs.app.app, new cljs.core.Keyword(null, "open!", "open!", 1119852169), a);
});
lt.objs.cli.args = function() {
  return lt.objs.app.first_window_QMARK_.call(null) && (cljs.core.seq.call(null, lt.objs.cli.open_files) || cljs.core.seq.call(null, cljs.core.truth_(process.env.LT_DEV_CLI) ? cljs.core.subvec.call(null, lt.objs.cli.argv, 2) : cljs.core.rest.call(null, lt.objs.cli.argv)));
};
lt.objs.cli.__BEH__open_on_args = function(a) {
  if (lt.objs.app.first_window_QMARK_.call(null)) {
    a = cljs.core.map.call(null, function(a) {
      var b = cljs.core.re_find.call(null, /^(.*?):?(\d+)?$/, a);
      cljs.core.nth.call(null, b, 0, null);
      a = cljs.core.nth.call(null, b, 1, null);
      b = cljs.core.nth.call(null, b, 2, null);
      return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.files.resolve.call(null, lt.objs.files.cwd, a), b], null);
    }, lt.objs.cli.args.call(null));
    var b = cljs.core.map.call(null, cljs.core.first, a), b = cljs.core.some.call(null, lt.objs.files.dir_QMARK_, b);
    cljs.core.truth_(b) && (lt.object.merge_BANG_.call(null, lt.objs.workspace.current_ws, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "initialized?", "initialized?", 613820253), !0], null)), lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592)));
    return lt.objs.cli.open_paths.call(null, a, (new cljs.core.Keyword(null, "add", "add", 1014000659)).cljs$core$IFn$_invoke$arity$1(lt.objs.cli.parsed_args));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.cli", "open-on-args", "lt.objs.cli/open-on-args", 3169685299), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.cli.__BEH__open_on_args, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Process commandline or file manager arguments", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"post-init", "post-init", 2970371471), null], null), null));
lt.objs.cli.__BEH__open_BANG_ = function(a, b) {
  return cljs.core._EQ_.call(null, lt.objs.app.fetch.call(null, new cljs.core.Keyword(null, "focusedWindow", "focusedWindow", 2946535865)), lt.objs.app.window_number.call(null)) ? lt.objs.cli.open_paths.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null)], null), (new cljs.core.Keyword(null, "add", "add", 1014000659)).cljs$core$IFn$_invoke$arity$1(lt.objs.cli.parsed_args)) : 
  null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.cli", "open!", "lt.objs.cli/open!", 969056930), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.cli.__BEH__open_BANG_, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Open path(s) from a file manager after startup", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", 
"open!", 1119852169), null], null), null));
lt.objs.intro = {};
lt.objs.intro.__BEH__on_close_destroy = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "destroy", "destroy", 2571277164));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.intro", "on-close-destroy", "lt.objs.intro/on-close-destroy", 1201771465), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.intro.__BEH__on_close_destroy, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.intro.__GT_lt_image = cljs.core.constantly.call(null, "img/lighttabletextdark.png");
lt.objs.intro.docs = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), "Light Table's online docs"], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "show-docs", "show-docs", 3358896765));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.intro.reports = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), "GitHub"], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910), "https://github.com/LightTable/LightTable/issues?state\x3dopen");
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.intro.changelog = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), "changelog"], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "version", "version", 1365512266));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.intro", "intro", "lt.objs.intro/intro", 1423877502), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "intro", "intro", 1114266078), null], null), null), new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.intro", 
"on-close-destroy", "lt.objs.intro/on-close-destroy", 1201771465)], null), new cljs.core.Keyword(null, "name", "name", 1017277949), "Welcome", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#intro", "div#intro", 1717177196), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h1", "h1", 1013907515), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "img", "img", 1014008629), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
  "height", "height", 4087841945), 40, new cljs.core.Keyword(null, "src", "src", 1014018390), crate.binding.bound.call(null, lt.objs.style.styles, lt.objs.intro.__GT_lt_image)], null)], null)], null), new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "Welcome to the latest version of Light Table. To see the full list of what's been added/changed, checkout the ", lt.objs.intro.changelog.call(null), ".\n                          Some of the highlights include deeper Javascript support, inline browsers, and Python eval! If you're new, you might want to take a look at ", 
  lt.objs.intro.docs.call(null), " to get started."], null), new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "If you run into any problems, report the issue on ", lt.objs.intro.reports.call(null), "!"], null)], null);
});
lt.objs.intro.__BEH__show_intro = function(a) {
  if (lt.objs.cli.args.call(null)) {
    return null;
  }
  a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.intro", "intro", "lt.objs.intro/intro", 1423877502));
  lt.util.dom.focus.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)));
  lt.objs.tabs.add_BANG_.call(null, a);
  return lt.objs.tabs.active_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.intro", "show-intro", "lt.objs.intro/show-intro", 4028211886), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.intro.__BEH__show_intro, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Open the welcome screen when Light Table starts", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"post-init", "post-init", 2970371471), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.intro", "show-new-file", "lt.objs.intro/show-new-file", 4438418795)], null));
lt.objs.intro.__BEH__show_new_file = function(a) {
  return lt.objs.cli.args.call(null) ? null : lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "new-file", "new-file", 2344641787));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.intro", "show-new-file", "lt.objs.intro/show-new-file", 4438418795), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.intro.__BEH__show_new_file, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Open a new file when Light Table starts", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"post-init", "post-init", 2970371471), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.intro", "show-intro", "lt.objs.intro/show-intro", 4028211886)], null));
lt.plugins = {};
lt.plugins.auto_paren = {};
lt.plugins.auto_paren.pairs = new cljs.core.PersistentArrayMap(null, 5, '(){}[]""\x3c\x3e'.split(""), null);
lt.plugins.auto_paren.word_char = /[^\s\)\}\]\(\{\[]/;
lt.plugins.auto_paren.adjust_loc = function(a, b) {
  return cljs.core.update_in.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ch", "ch", 1013907415)], null), cljs.core._PLUS_, b);
};
lt.plugins.auto_paren.get_char = function(a, b) {
  var c = lt.objs.editor.__GT_cursor.call(null, a);
  return 0 < b ? lt.objs.editor.range.call(null, a, c, lt.plugins.auto_paren.adjust_loc.call(null, c, b)) : lt.objs.editor.range.call(null, a, lt.plugins.auto_paren.adjust_loc.call(null, c, b), c);
};
lt.plugins.auto_paren.move_cursor = function(a, b) {
  var c = lt.objs.editor.__GT_cursor.call(null, a);
  return lt.objs.editor.move_cursor.call(null, a, lt.plugins.auto_paren.adjust_loc.call(null, c, b));
};
lt.plugins.auto_paren.__BEH__open_pair = function(a, b) {
  return lt.objs.editor.operation.call(null, a, function() {
    var c = lt.objs.editor.selection.call(null, a);
    if (cljs.core._EQ_.call(null, c, "")) {
      if (cljs.core.truth_(cljs.core.re_seq.call(null, lt.plugins.auto_paren.word_char, lt.plugins.auto_paren.get_char.call(null, a, 1)))) {
        return lt.objs.editor.insert_at_cursor.call(null, a, b);
      }
      lt.objs.editor.insert_at_cursor.call(null, a, [cljs.core.str(b), cljs.core.str(lt.plugins.auto_paren.pairs.call(null, b))].join(""));
      return lt.plugins.auto_paren.move_cursor.call(null, a, -1);
    }
    return lt.objs.editor.replace_selection.call(null, a, [cljs.core.str(b), cljs.core.str(c), cljs.core.str(lt.plugins.auto_paren.pairs.call(null, b))].join(""), new cljs.core.Keyword(null, "around", "around", 3899636031));
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-paren", "open-pair", "lt.plugins.auto-paren/open-pair", 1001093559), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_paren.__BEH__open_pair, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open-pair!", "open-pair!", 4565354166), null], null), null));
lt.plugins.auto_paren.__BEH__close_pair = function(a, b) {
  return cljs.core._EQ_.call(null, b, lt.plugins.auto_paren.get_char.call(null, a, 1)) ? lt.plugins.auto_paren.move_cursor.call(null, a, 1) : lt.objs.keyboard.passthrough.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-paren", "close-pair", "lt.plugins.auto-paren/close-pair", 4607377033), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_paren.__BEH__close_pair, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close-pair!", "close-pair!", 4389766116), null], null), null));
lt.plugins.auto_paren.__BEH__repeat_pair = function(a, b) {
  return lt.objs.editor.operation.call(null, a, function() {
    var c = lt.objs.editor.selection.call(null, a);
    return cljs.core._EQ_.call(null, c, "") ? cljs.core._EQ_.call(null, b, lt.plugins.auto_paren.get_char.call(null, a, 1)) ? lt.plugins.auto_paren.move_cursor.call(null, a, 1) : cljs.core.truth_(cljs.core.re_seq.call(null, lt.plugins.auto_paren.word_char, lt.plugins.auto_paren.get_char.call(null, a, 1))) || cljs.core.truth_(cljs.core.re_seq.call(null, lt.plugins.auto_paren.word_char, lt.plugins.auto_paren.get_char.call(null, a, -1))) ? lt.objs.editor.insert_at_cursor.call(null, a, b) : new cljs.core.Keyword(null, 
    "else", "else", 1017020587) ? (lt.objs.editor.insert_at_cursor.call(null, a, [cljs.core.str(b), cljs.core.str(b)].join("")), lt.plugins.auto_paren.move_cursor.call(null, a, -1)) : null : lt.objs.editor.replace_selection.call(null, a, [cljs.core.str(b), cljs.core.str(c), cljs.core.str(b)].join(""));
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-paren", "repeat-pair", "lt.plugins.auto-paren/repeat-pair", 948310982), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_paren.__BEH__repeat_pair, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "repeat-pair!", "repeat-pair!", 1856851271), null], null), null));
lt.plugins.auto_paren.__BEH__try_remove_pair = function(a) {
  if (cljs.core.not.call(null, lt.objs.editor.selection_QMARK_.call(null, a))) {
    var b = lt.plugins.auto_paren.get_char.call(null, a, -1);
    if (cljs.core.truth_(function() {
      var c = lt.plugins.auto_paren.pairs.call(null, b);
      return cljs.core.truth_(c) ? cljs.core._EQ_.call(null, lt.plugins.auto_paren.get_char.call(null, a, 1), lt.plugins.auto_paren.pairs.call(null, b)) : c;
    }())) {
      var c = lt.objs.editor.__GT_cursor.call(null, a);
      lt.objs.editor.replace.call(null, a, lt.plugins.auto_paren.adjust_loc.call(null, c, -1), lt.plugins.auto_paren.adjust_loc.call(null, c, 1), "");
      return lt.objs.keyboard.stop_commands_BANG_.call(null);
    }
  }
  return lt.objs.keyboard.passthrough.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-paren", "try-remove-pair", "lt.plugins.auto-paren/try-remove-pair", 1181077163), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_paren.__BEH__try_remove_pair, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "backspace!", "backspace!", 4317945588), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.close-pair", "editor.close-pair", 2068601890), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Close pair character", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330)), new cljs.core.Keyword(null, "close-pair!", "close-pair!", 4389766116), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.open-pair", "editor.open-pair", 4001431726), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Open pair character", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330)), new cljs.core.Keyword(null, "open-pair!", "open-pair!", 4565354166), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.repeat-pair", "editor.repeat-pair", 1820110909), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Repeat pair character", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330)), new cljs.core.Keyword(null, "repeat-pair!", "repeat-pair!", 1856851271), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.backspace-pair", "editor.backspace-pair", 3593263483), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Pair aware backspace", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330)), new cljs.core.Keyword(null, "backspace!", "backspace!", 4317945588), a);
}], null));
lt.plugins.auto_paren.pre_cursor_indent = function(a, b) {
  var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "ch", "ch", 1013907415)), e = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "line", "line", 1017226086)), f = lt.objs.editor.option.call(null, a, new cljs.core.Keyword(null, "indentWithTabs", "indentWithTabs", 4541079970)), c = lt.objs.editor.option.call(null, a, new cljs.core.Keyword(null, "indentUnit", "indentUnit", 1493236674)), 
  d = lt.objs.editor.line.call(null, a, e).substring(0, d), d = cljs.core.count.call(null, cljs.core.re_find.call(null, cljs.core.truth_(f) ? /^\t*$/ : /^ *$/, d));
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.quot.call(null, d, c), cljs.core.mod.call(null, d, c)], null);
};
lt.plugins.auto_paren.backspace_indent = function(a) {
  if (cljs.core.not.call(null, function() {
    var b = lt.objs.editor.selection_QMARK_.call(null, a);
    return cljs.core.truth_(b) ? b : 1 < lt.objs.editor.__GT_cm_ed.call(null, a).getSelections().length;
  }())) {
    var b = lt.objs.editor.__GT_cursor.call(null, a), c = lt.objs.editor.option.call(null, a, new cljs.core.Keyword(null, "indentUnit", "indentUnit", 1493236674)), d = lt.plugins.auto_paren.pre_cursor_indent.call(null, a, b), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), b = 0 < d ? lt.plugins.auto_paren.adjust_loc.call(null, lt.objs.editor.__GT_cursor.call(null, a), c - d) : b, d = 0 < d ? lt.plugins.auto_paren.pre_cursor_indent.call(null, a, b) : new cljs.core.PersistentVector(null, 
    2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, d], null), e = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null);
    if (0 < e && 0 === d) {
      return lt.objs.editor.replace.call(null, a, lt.plugins.auto_paren.adjust_loc.call(null, b, -c), b, ""), lt.objs.keyboard.stop_commands_BANG_.call(null);
    }
  }
  return lt.objs.keyboard.passthrough.call(null);
};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.backspace-indent", "editor.backspace-indent", 1393448845), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Indent aware backspace", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.plugins.auto_paren.backspace_indent.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "editor.keys.normal", "editor.keys.normal", 2927389330)));
}], null));
lt.objs.eval = {};
lt.objs.eval.button = function() {
  var a = function(a, b) {
    for (var e = cljs.core.nth.call(null, b, 0, null), f = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.button.right", "div.button.right", 629503503), a], null)), g = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
      return cljs.core.truth_(e) ? e.call(null) : null;
    }], null))), h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l), n = cljs.core.nth.call(null, m, 0, null), m = cljs.core.nth.call(null, m, 1, null);
        lt.util.dom.on.call(null, f, n, m);
        l += 1;
      } else {
        if (g = cljs.core.seq.call(null, g)) {
          cljs.core.chunked_seq_QMARK_.call(null, g) ? (k = cljs.core.chunk_first.call(null, g), g = cljs.core.chunk_rest.call(null, g), h = k, k = cljs.core.count.call(null, k)) : (k = cljs.core.first.call(null, g), h = cljs.core.nth.call(null, k, 0, null), k = cljs.core.nth.call(null, k, 1, null), lt.util.dom.on.call(null, f, h, k), g = cljs.core.next.call(null, g), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
    return f;
  }, b = function(b, d) {
    var e = null;
    1 < arguments.length && (e = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
    return a.call(this, b, e);
  };
  b.cljs$lang$maxFixedArity = 1;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.eval.unescape_unicode = function(a) {
  return clojure.string.replace.call(null, a, /\\x(..)/, function(a, c) {
    return String.fromCharCode(parseInt(c, 16));
  });
};
var ev_id_8494 = cljs.core.atom.call(null, 0);
lt.objs.eval.append_source_file = function(a, b) {
  return[cljs.core.str(a), cljs.core.str("\n\n//# sourceURL\x3d"), cljs.core.str(cljs.core.truth_(b) ? b : "evalresult"), cljs.core.str("[eval"), cljs.core.str(cljs.core.swap_BANG_.call(null, ev_id_8494, cljs.core.inc)), cljs.core.str("]")].join("");
};
lt.objs.eval.pad = function(a, b) {
  return[cljs.core.str(cljs.core.reduce.call(null, cljs.core.str, cljs.core.repeat.call(null, b, "\n"))), cljs.core.str(a)].join("");
};
lt.objs.eval.cljs_result_format = function(a) {
  return cljs.core.coll_QMARK_.call(null, a) ? cljs.core.pr_str.call(null, a) : cljs.core.fn_QMARK_.call(null, a) ? [cljs.core.str("(fn "), cljs.core.str(a.name), cljs.core.str(" ..)")].join("") : null == a ? "nil" : cljs.core._EQ_.call(null, cljs.core.pr_str.call(null, a), "#\x3c[object Object]\x3e") ? lt.objs.console.inspect.call(null, a) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? cljs.core.pr_str.call(null, a) : null;
};
lt.objs.eval.__BEH__on_selected_cb = function(a, b) {
  return cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "cb", "cb", 1013907409)).call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "on-selected-cb", "lt.objs.eval/on-selected-cb", 1941170511), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__on_selected_cb, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), null], null), null));
lt.objs.eval.__BEH__on_selected_destroy = function(a, b) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "destroy", "destroy", 2571277164));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "on-selected-destroy", "lt.objs.eval/on-selected-destroy", 4250002546), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__on_selected_destroy, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), null], null), null));
lt.objs.eval.eval_queue = cljs.core.atom.call(null, cljs.core.PersistentVector.EMPTY);
lt.objs.eval.__BEH__queue_on_no_client = function(a, b) {
  return cljs.core.swap_BANG_.call(null, lt.objs.eval.eval_queue, cljs.core.conj, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "queue-on-no-client", "lt.objs.eval/queue-on-no-client", 3460059553), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__queue_on_no_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "no-client", "no-client", 4161042633), null], null), null));
lt.objs.eval.__BEH__alert_on_no_client = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "No client available.", new cljs.core.Keyword(null, "body", "body", 1016933652), "We don't know what kind of client you want for this one. Try starting a client by choosing one of the connection types in the connect panel.", new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Connect a client", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "show-add-connection", "show-add-connection", 3671605196));
  }], null)], null)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "alert-on-no-client", "lt.objs.eval/alert-on-no-client", 3202745142), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__alert_on_no_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "no-client", "no-client", 4161042633), null], null), null));
lt.objs.eval.__BEH__queue_BANG_ = function(a, b) {
  return cljs.core.swap_BANG_.call(null, lt.objs.eval.eval_queue, cljs.core.conj, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "queue!", "lt.objs.eval/queue!", 3205931164), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__queue_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "queue!", "queue!", 4360174754), null], null), null));
lt.objs.eval.drain = function(a) {
  return cljs.core.vec.call(null, cljs.core.remove.call(null, function(a) {
    cljs.core.nth.call(null, a, 0, null);
    cljs.core.nth.call(null, a, 1, null);
    var c = cljs.core.nth.call(null, a, 2, null), d = cljs.core.apply.call(null, lt.objs.clients.discover, a);
    a = cljs.core.nth.call(null, d, 0, null);
    d = cljs.core.nth.call(null, d, 1, null);
    return cljs.core._EQ_.call(null, new cljs.core.Keyword(null, "found", "found", 1111526132), a) ? (c.call(null, d), !0) : null;
  }, a));
};
lt.objs.eval.__BEH__on_connect_check_queue = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.objs.eval.eval_queue, lt.objs.eval.drain);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "on-connect-check-queue", "lt.objs.eval/on-connect-check-queue", 2429838903), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__on_connect_check_queue, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "evaler", "lt.objs.eval/evaler", 3546586565), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "evaler", "evaler", 4017420731), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function() {
  return null;
});
lt.objs.eval.evaler = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "evaler", "lt.objs.eval/evaler", 3546586565));
lt.object.add_behavior_BANG_.call(null, lt.objs.clients.clients, new cljs.core.Keyword("lt.objs.eval", "on-connect-check-queue", "lt.objs.eval/on-connect-check-queue", 2429838903));
lt.objs.eval.try_read = function(a) {
  try {
    return cljs.reader.read_string.call(null, a);
  } catch (b) {
    return lt.objs.console.error.call(null, b);
  }
};
lt.objs.eval.find_client = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  var b = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "create", "create", 3956577390)), c = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "key", "key", 1014010321)), d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "info", "info", 1017141280)), e = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "command", "command", 1964298941)), f = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "origin", "origin", 4300251800)), e = lt.objs.clients.discover.call(null, 
  e, d), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), g = cljs.core.truth_(c) ? c : new cljs.core.Keyword(null, "default", "default", 2558708147), c = cljs.core._EQ_;
  if (cljs.core.truth_(c.call(null, new cljs.core.Keyword(null, "none", "none", 1017291434), d))) {
    if (cljs.core.truth_(b)) {
      return b.call(null, a);
    }
    lt.objs.notifos.done_working.call(null);
    lt.object.raise.call(null, lt.objs.eval.evaler, new cljs.core.Keyword(null, "no-client", "no-client", 4161042633), a);
    return lt.objs.clients.placeholder.call(null);
  }
  if (cljs.core.truth_(c.call(null, new cljs.core.Keyword(null, "found", "found", 1111526132), d))) {
    return e;
  }
  if (cljs.core.truth_(c.call(null, new cljs.core.Keyword(null, "select", "select", 4402849902), d))) {
    return lt.object.raise.call(null, lt.objs.eval.evaler, new cljs.core.Keyword(null, "select-client", "select-client", 4292921646), e, function(a) {
      lt.objs.clients.swap_client_BANG_.call(null, g.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, f))), a);
      return lt.object.update_BANG_.call(null, f, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "client", "client", 3951159101)], null), cljs.core.assoc, g, a);
    }), lt.objs.clients.placeholder.call(null);
  }
  throw Error([cljs.core.str("No matching clause: "), cljs.core.str(d)].join(""));
};
lt.objs.eval.get_client_BANG_ = function(a) {
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  cljs.core.get.call(null, b, new cljs.core.Keyword(null, "create", "create", 3956577390));
  var c = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "key", "key", 1014010321));
  cljs.core.get.call(null, b, new cljs.core.Keyword(null, "command", "command", 1964298941));
  a = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "origin", "origin", 4300251800));
  var c = cljs.core.truth_(c) ? c : new cljs.core.Keyword(null, "default", "default", 2558708147), d = c.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  if (cljs.core.truth_(cljs.core.truth_(d) ? lt.objs.clients.available_QMARK_.call(null, d) : d)) {
    return d;
  }
  b = lt.objs.eval.find_client.call(null, b);
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "client", "client", 3951159101)], null), cljs.core.assoc, c, b);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set-client", "set-client", 2248164104), b);
  return b;
};
lt.objs.eval.__GT_result_class = function(a, b) {
  return[cljs.core.str((new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str("-result result-mark"), cljs.core.str(cljs.core.truth_(function() {
    var c = (new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(a);
    return cljs.core.truth_(c) ? c : cljs.core.not.call(null, b);
  }()) ? " open" : null)].join("");
};
lt.objs.eval.truncate_result = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    if ("string" === typeof a) {
      var c = a.indexOf("\n"), c = -1 < c ? c : (new cljs.core.Keyword(null, "trunc-length", "trunc-length", 2555961753)).cljs$core$IFn$_invoke$arity$2(b, 50);
      return cljs.core.count.call(null, a) > c ? [cljs.core.str(cljs.core.subs.call(null, a, 0, c)), cljs.core.str(" \u2026")].join("") : a;
    }
    return null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.objs.eval.__GT_inline_res = function(a, b) {
  for (var c = crate.core.html.call(null, function() {
    var c = (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(b), d = lt.objs.eval.truncate_result.call(null, c, b);
    return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a, b) {
      return function(a) {
        return lt.objs.eval.__GT_result_class.call(null, a, b);
      };
    }(c, d))], null), cljs.core.truth_(d) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.truncated", "span.truncated", 906070412), d], null) : null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.full", "span.full", 4619654693), c], null)], null);
  }()), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 8, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "mousewheel", "mousewheel", 2043515208), function(a) {
    return lt.util.dom.stop_propagation.call(null, a);
  }, new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330));
  }, new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }, new cljs.core.Keyword(null, "dblclick", "dblclick", 3463991820), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "double-click", "double-click", 956590078));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.eval.__BEH__result_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Remove result", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Copy result", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "copy", "copy", 1016963815));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "result-menu+", "lt.objs.eval/result-menu+", 3431235704), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__result_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.eval.__BEH__expand_on_click = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "changed", "changed", 1752847910));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "expand-on-click", "lt.objs.eval/expand-on-click", 541363545), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__expand_on_click, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "expand!", "expand!", 3999393849), null, new cljs.core.Keyword(null, "click", "click", 1108654330), 
null], null), null));
lt.objs.eval.__BEH__shrink_on_double_click = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !1], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "changed", "changed", 1752847910));
  return lt.objs.editor.focus.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "shrink-on-double-click", "lt.objs.eval/shrink-on-double-click", 3353397618), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__shrink_on_double_click, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "double-click", "double-click", 956590078), null, new cljs.core.Keyword(null, 
"shrink!", "shrink!", 3083562666), null], null), null));
lt.objs.eval.__BEH__destroy_on_cleared = function(a) {
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "destroy-on-cleared", "lt.objs.eval/destroy-on-cleared", 4445067485), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__destroy_on_cleared, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cleared", "cleared", 1870681886), null], null), null));
lt.objs.eval.__BEH__clear_mark = function(a) {
  return cljs.core.truth_(cljs.core.deref.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) ? (CodeMirror.off((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), "change", (new cljs.core.Keyword(null, "listener", "listener", 2360064038)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), CodeMirror.off((new cljs.core.Keyword(null, "line", "line", 
  1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), "delete", (new cljs.core.Keyword(null, "delete", "delete", 3973413149)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).clear(), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear", "clear", 1108650431)), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "cleared", "cleared", 
  1870681886))) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "clear-mark", "lt.objs.eval/clear-mark", 1960624569), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__clear_mark, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.eval.__BEH__copy_result = function(a) {
  return lt.objs.platform.copy.call(null, (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "copy-result", "lt.objs.eval/copy-result", 4462509297), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__copy_result, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "copy", "copy", 1016963815), null], null), null));
lt.objs.eval.__BEH__changed = function(a) {
  return(new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).changed();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "changed", "lt.objs.eval/changed", 710785568), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "changed", "changed", 1752847910), null], null), null));
lt.objs.eval.__BEH__update_BANG_ = function(a, b) {
  var c = lt.object.__GT_content.call(null, a), d = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".full", ".full", 1059540783), c), e = lt.util.dom.scroll_top.call(null, d), f = lt.objs.eval.truncate_result.call(null, b);
  cljs.core.truth_(f) && (c = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".truncated", ".truncated", 2172167874), c), cljs.core.truth_(c) && lt.util.dom.html.call(null, c, f));
  lt.util.dom.html.call(null, d, b);
  return lt.util.dom.scroll_top.call(null, d, e);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "update!", "lt.objs.eval/update!", 2489665524), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__update_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "update!", "update!", 779473898), null], null), null));
lt.objs.eval.new_line_change = new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, ["", ""], null);
lt.objs.eval.__BEH__move_mark = function(a, b) {
  if (cljs.core.truth_(b)) {
    var c = (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = c.find(), e = lt.objs.editor.lh__GT_line.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    if (cljs.core.not.call(null, d) || cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).text)) {
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
    }
    if (d.line > b.to.line && cljs.core.empty_QMARK_.call(null, clojure.string.trim.call(null, lt.objs.editor.line.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d.line))) || b.to.ch >= d.ch && cljs.core._EQ_.call(null, b.to.line, d.line) || b.to.line > b.from.line) {
      return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "mark", "mark", 1017248319), lt.objs.editor.bookmark.call(null, lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "line", "line", 1017226086), e], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, 
      "widget", "widget", 4520824246), lt.object.__GT_content.call(null, a), new cljs.core.Keyword(null, "insertLeft", "insertLeft", 1979827666), !0], null))], null)), cljs.core.truth_(c) ? c.clear() : null;
    }
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "move-mark", "lt.objs.eval/move-mark", 1501429445), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__move_mark, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move!", "move!", 1117991394), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-result", "lt.objs.eval/inline-result", 1807255869), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "double-click", "double-click", 956590078), null, new cljs.core.Keyword(null, "click", "click", 1108654330), null, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null), 
new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "inline.result", "inline.result", 1543983236), null, new cljs.core.Keyword(null, "inline", "inline", 4124874251), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  var c = lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(b));
  if (cljs.core.truth_(c)) {
    var d = lt.objs.eval.__GT_inline_res.call(null, a, b), e = function(b) {
      return function(b) {
        return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
      };
    }(d), f = function(b, c) {
      return function(b, c) {
        return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move!", "move!", 1117991394), c);
      };
    }(d, e);
    CodeMirror.on((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), "change", f);
    CodeMirror.on((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), "delete", e);
    lt.object.merge_BANG_.call(null, a, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "listener", "listener", 2360064038), f, new cljs.core.Keyword(null, "delete", "delete", 3973413149), e, new cljs.core.Keyword(null, "mark", "mark", 1017248319), lt.objs.editor.bookmark.call(null, c, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, 
    "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b))], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "widget", "widget", 4520824246), d, new cljs.core.Keyword(null, "insertLeft", "insertLeft", 1979827666), !0], null))));
    return d;
  }
  return null;
});
lt.objs.eval.__BEH__inline_results = function(a, b, c, d) {
  var e = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), f = function() {
    var a = (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(d);
    return cljs.core.truth_(a) ? a : new cljs.core.Keyword(null, "inline", "inline", 4124874251);
  }(), g = lt.objs.editor.line_handle.call(null, e, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c));
  b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-result", "lt.objs.eval/inline-result", 1807255869), new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "class", "class", 1108647146), cljs.core.name.call(null, f), new cljs.core.Keyword(null, "opts", "opts", 1017322386), d, new cljs.core.Keyword(null, "result", "result", 4374444943), b, new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, 
  new cljs.core.Keyword(null, "line", "line", 1017226086), g], null));
  var h = cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [g, f], null));
  cljs.core.truth_(h) && (cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, h))) && lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null)), lt.object.raise.call(null, h, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)));
  if (cljs.core.truth_((new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c))) {
    c = cljs.core.seq.call(null, cljs.core.map.call(null, function(b) {
      return cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.editor.line_handle.call(null, e, b), f], null));
    }, cljs.core.range.call(null, (new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c))));
    for (var h = null, k = 0, l = 0;;) {
      if (l < k) {
        var m = cljs.core._nth.call(null, h, l);
        cljs.core.truth_(m) && lt.object.raise.call(null, m, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
        l += 1;
      } else {
        if (c = cljs.core.seq.call(null, c)) {
          h = c, cljs.core.chunked_seq_QMARK_.call(null, h) ? (c = cljs.core.chunk_first.call(null, h), l = cljs.core.chunk_rest.call(null, h), h = c, k = cljs.core.count.call(null, c), c = l) : (c = cljs.core.first.call(null, h), cljs.core.truth_(c) && lt.object.raise.call(null, c, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), c = cljs.core.next.call(null, h), h = null, k = 0), l = 0;
        } else {
          break;
        }
      }
    }
  }
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.assoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [g, f], null), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-results", "lt.objs.eval/inline-results", 3940069422), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__inline_results, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.result", "editor.result", 4030217008), null], null), null));
lt.objs.eval.__GT_spacing = function(a) {
  return cljs.core.truth_(a) ? cljs.core.first.call(null, cljs.core.re_seq.call(null, /^\s+/, a)) : null;
};
lt.objs.eval.__GT_underline_result = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), [cljs.core.str("underline-result "), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(b)) ? (new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(b) : 
  null)].join("")], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.spacer", "span.spacer", 4763675330), lt.objs.eval.__GT_spacing.call(null, lt.objs.editor.line.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b))))], 
  null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(b)], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330));
  }, new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }, new cljs.core.Keyword(null, "dblclick", "dblclick", 3463991820), function(b) {
    lt.util.dom.prevent.call(null, b);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "double-click", "double-click", 956590078));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "underline-result", "lt.objs.eval/underline-result", 1485297066), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "inline.underline-result", "inline.underline-result", 1936787557), null, new cljs.core.Keyword(null, "inline", "inline", 4124874251), null], null), null), new cljs.core.Keyword(null, "init", "init", 
1017141378), function(a, b) {
  var c = lt.objs.eval.__GT_underline_result.call(null, a, b), d = function(b) {
    return function(b) {
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
    };
  }(c), e = function(b, c) {
    return function(b, c) {
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move!", "move!", 1117991394), c);
    };
  }(c, d);
  CodeMirror.on((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), "change", e);
  CodeMirror.on((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), "delete", d);
  lt.object.merge_BANG_.call(null, a, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "widget", "widget", 4520824246), lt.objs.editor.line_widget.call(null, lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(b)), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b)), c, new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "coverGutter", "coverGutter", 510635812), !1, new cljs.core.Keyword(null, "above", "above", 1106515727), (new cljs.core.Keyword(null, "above", "above", 1106515727)).cljs$core$IFn$_invoke$arity$1(b)], null))));
  return c;
});
lt.objs.eval.__BEH__underline_results = function(a, b, c, d) {
  var e = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), f = lt.objs.editor.line_handle.call(null, e, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c));
  b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "underline-result", "lt.objs.eval/underline-result", 1485297066), new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "opts", "opts", 1017322386), d, new cljs.core.Keyword(null, "result", "result", 4374444943), b, new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, new cljs.core.Keyword(null, "line", "line", 1017226086), f], null));
  d = cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f, new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null));
  cljs.core.truth_(d) && (cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, d))) && lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null)), lt.object.raise.call(null, d, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)));
  if (cljs.core.truth_((new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c))) {
    c = cljs.core.seq.call(null, cljs.core.map.call(null, function(b) {
      return cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.editor.line_handle.call(null, e, b), new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null));
    }, cljs.core.range.call(null, (new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c))));
    d = null;
    for (var g = 0, h = 0;;) {
      if (h < g) {
        var k = cljs.core._nth.call(null, d, h);
        cljs.core.truth_(k) && lt.object.raise.call(null, k, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
        h += 1;
      } else {
        if (c = cljs.core.seq.call(null, c)) {
          d = c, cljs.core.chunked_seq_QMARK_.call(null, d) ? (c = cljs.core.chunk_first.call(null, d), h = cljs.core.chunk_rest.call(null, d), d = c, g = cljs.core.count.call(null, c), c = h) : (c = cljs.core.first.call(null, d), cljs.core.truth_(c) && lt.object.raise.call(null, c, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), c = cljs.core.next.call(null, d), d = null, g = 0), h = 0;
        } else {
          break;
        }
      }
    }
  }
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.assoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [f, new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "underline-results", "lt.objs.eval/underline-results", 4366201201), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__underline_results, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.result.underline", "editor.result.underline", 541343758), null], null), null));
lt.objs.eval.__GT_exception_class = function(a) {
  return[cljs.core.str("inline-exception "), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(a)) ? "open" : null)].join("");
};
lt.objs.eval.__GT_inline_exception = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.eval.__GT_exception_class)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.spacer", "span.spacer", 
  4763675330), lt.objs.eval.__GT_spacing.call(null, lt.objs.editor.line.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b))))], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), "" + 
  cljs.core.str((new cljs.core.Keyword(null, "ex", "ex", 1013907493)).cljs$core$IFn$_invoke$arity$1(b))], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "click", "click", 1108654330));
  }, new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }, new cljs.core.Keyword(null, "dblclick", "dblclick", 3463991820), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "double-click", "double-click", 956590078));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.eval.__BEH__ex_shrink_on_double_click = function(a) {
  lt.objs.editor.focus.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "ex-shrink-on-double-click", "lt.objs.eval/ex-shrink-on-double-click", 626922428), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__ex_shrink_on_double_click, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "double-click", "double-click", 956590078), null, new cljs.core.Keyword(null, 
"shrink!", "shrink!", 3083562666), null], null), null));
lt.objs.eval.__BEH__ex_clear = function(a) {
  cljs.core.truth_(lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) && lt.objs.editor.remove_line_widget.call(null, lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), (new cljs.core.Keyword(null, "widget", "widget", 4520824246)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear", "clear", 1108650431));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "cleared", "cleared", 1870681886));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "ex-clear", "lt.objs.eval/ex-clear", 1010359327), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__ex_clear, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.eval.__BEH__ex_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Remove exception", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Copy exception", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "copy", "copy", 1016963815));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "ex-menu+", "lt.objs.eval/ex-menu+", 1003388030), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__ex_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.eval.__BEH__copy_exception = function(a) {
  return lt.objs.platform.copy.call(null, (new cljs.core.Keyword(null, "ex", "ex", 1013907493)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "copy-exception", "lt.objs.eval/copy-exception", 3421301619), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__copy_exception, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "copy", "copy", 1016963815), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-exception", "lt.objs.eval/inline-exception", 2990080407), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "double-click", "double-click", 956590078), null, new cljs.core.Keyword(null, "click", "click", 1108654330), null, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), 
null), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "inline.exception", "inline.exception", 3303739052), null, new cljs.core.Keyword(null, "inline", "inline", 4124874251), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  if (cljs.core.not.call(null, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b)))) {
    return lt.objs.notifos.set_msg_BANG_.call(null, "" + cljs.core.str((new cljs.core.Keyword(null, "ex", "ex", 1013907493)).cljs$core$IFn$_invoke$arity$1(b)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  var c = lt.objs.eval.__GT_inline_exception.call(null, a, b);
  lt.object.merge_BANG_.call(null, a, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "widget", "widget", 4520824246), lt.objs.editor.line_widget.call(null, lt.objs.editor.__GT_cm_ed.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(b)), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b)), c, new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "coverGutter", "coverGutter", 510635812), !1], null))));
  return c;
});
lt.objs.eval.__BEH__inline_exceptions = function(a, b, c) {
  if (cljs.core.truth_(cljs.core.truth_(b) ? cljs.core.truth_(c) ? 0 <= (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c) : c : b)) {
    var d = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), e = lt.objs.editor.line_handle.call(null, d, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c));
    b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-exception", "lt.objs.eval/inline-exception", 2990080407), new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "ex", "ex", 1013907493), b, new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, new cljs.core.Keyword(null, "line", "line", 1017226086), e], null));
    for (var f = cljs.core.seq.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, new cljs.core.Keyword(null, "inline", "inline", 4124874251)], null)), cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, 
    "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null))], null)), g = null, h = 0, k = 0;;) {
      if (k < h) {
        var l = cljs.core._nth.call(null, g, k);
        cljs.core.truth_(l) && (cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, l))) && lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null)), lt.object.raise.call(null, l, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)));
        k += 1;
      } else {
        if (f = cljs.core.seq.call(null, f)) {
          g = f, cljs.core.chunked_seq_QMARK_.call(null, g) ? (f = cljs.core.chunk_first.call(null, g), k = cljs.core.chunk_rest.call(null, g), g = f, h = cljs.core.count.call(null, f), f = k) : (f = cljs.core.first.call(null, g), cljs.core.truth_(f) && (cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, f))) && lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
          "open", "open", 1017321916), !0], null)), lt.object.raise.call(null, f, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134))), f = cljs.core.next.call(null, g), g = null, h = 0), k = 0;
        } else {
          break;
        }
      }
    }
    if (cljs.core.truth_((new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c))) {
      for (f = cljs.core.seq.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "inline", "inline", 4124874251), new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null)), g = null, k = h = 0;;) {
        if (k < h) {
          for (var l = cljs.core._nth.call(null, g, k), l = cljs.core.seq.call(null, cljs.core.map.call(null, function(b, c, e, f, g) {
            return function(b) {
              return cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.editor.line_handle.call(null, d, b), g], null));
            };
          }(f, g, h, k, l), cljs.core.range.call(null, (new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c)))), m = null, n = 0, p = 0;;) {
            if (p < n) {
              var q = cljs.core._nth.call(null, m, p);
              cljs.core.truth_(q) && lt.object.raise.call(null, q, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
              p += 1;
            } else {
              if (l = cljs.core.seq.call(null, l)) {
                m = l, cljs.core.chunked_seq_QMARK_.call(null, m) ? (l = cljs.core.chunk_first.call(null, m), p = cljs.core.chunk_rest.call(null, m), m = l, n = cljs.core.count.call(null, l), l = p) : (l = cljs.core.first.call(null, m), cljs.core.truth_(l) && lt.object.raise.call(null, l, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), l = cljs.core.next.call(null, m), m = null, n = 0), p = 0;
              } else {
                break;
              }
            }
          }
          k += 1;
        } else {
          if (m = cljs.core.seq.call(null, f)) {
            l = m;
            if (cljs.core.chunked_seq_QMARK_.call(null, l)) {
              f = cljs.core.chunk_first.call(null, l), k = cljs.core.chunk_rest.call(null, l), g = f, h = cljs.core.count.call(null, f), f = k;
            } else {
              n = cljs.core.first.call(null, l);
              f = cljs.core.seq.call(null, cljs.core.map.call(null, function(b, c, e, f, g, h, k) {
                return function(b) {
                  return cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.editor.line_handle.call(null, d, b), g], null));
                };
              }(f, g, h, k, n, l, m), cljs.core.range.call(null, (new cljs.core.Keyword(null, "start-line", "start-line", 3689311729)).cljs$core$IFn$_invoke$arity$1(c), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c))));
              g = null;
              for (k = h = 0;;) {
                if (k < h) {
                  m = cljs.core._nth.call(null, g, k), cljs.core.truth_(m) && lt.object.raise.call(null, m, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), k += 1;
                } else {
                  if (f = cljs.core.seq.call(null, f)) {
                    g = f, cljs.core.chunked_seq_QMARK_.call(null, g) ? (f = cljs.core.chunk_first.call(null, g), k = cljs.core.chunk_rest.call(null, g), g = f, h = cljs.core.count.call(null, f), f = k) : (f = cljs.core.first.call(null, g), cljs.core.truth_(f) && lt.object.raise.call(null, f, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), f = cljs.core.next.call(null, g), g = null, h = 0), k = 0;
                  } else {
                    break;
                  }
                }
              }
              f = cljs.core.next.call(null, l);
              g = null;
              h = 0;
            }
            k = 0;
          } else {
            break;
          }
        }
      }
    }
    return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.assoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, new cljs.core.Keyword(null, "inline", "inline", 4124874251)], null), b);
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-exceptions", "lt.objs.eval/inline-exceptions", 2489921844), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__inline_exceptions, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.exception", "editor.exception", 3983021184), null], null), null));
lt.objs.eval.__BEH__eval_on_change = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "eval", "eval", 1017029646));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.eval", "eval-on-change", "lt.objs.eval/eval-on-change", 2788474585), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.eval.__BEH__eval_on_change, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Eval when the editor changes", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"change", "change", 3947235106), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 300);
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "clear-inline-results", "clear-inline-results", 1542062004), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Eval: Clear inline results", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    for (var a = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b = null, c = 0, d = 0;;) {
      if (d < c) {
        var e = cljs.core._nth.call(null, b, d);
        cljs.core.nth.call(null, e, 0, null);
        e = cljs.core.nth.call(null, e, 1, null);
        lt.object.raise.call(null, e, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
        d += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          cljs.core.chunked_seq_QMARK_.call(null, a) ? (c = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), b = c, c = cljs.core.count.call(null, c)) : (b = cljs.core.first.call(null, a), cljs.core.nth.call(null, b, 0, null), e = cljs.core.nth.call(null, b, 1, null), lt.object.raise.call(null, e, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), a = cljs.core.next.call(null, a), b = null, c = 0), d = 0;
        } else {
          return null;
        }
      }
    }
  } else {
    return null;
  }
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "eval-editor", "eval-editor", 2482317104), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Eval: Eval editor contents", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "eval", "eval", 1017029646)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "eval-editor-form", "eval-editor-form", 4138964197), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Eval: Eval a form in editor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "eval.one", "eval.one", 1173589382)) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "eval.custom", "eval.custom", 3328560245), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Eval: Eval custom expression in editor", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a, b) {
  var c = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(c) ? lt.object.raise.call(null, c, new cljs.core.Keyword(null, "eval.custom", "eval.custom", 3328560245), a, b) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "eval.cancel-all!", "eval.cancel-all!", 3689151283), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Eval: Cancel evaluation for the current client", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    if (cljs.core.truth_((new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
      for (var a = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b = null, c = 0, d = 0;;) {
        if (d < c) {
          var e = cljs.core._nth.call(null, b, d);
          cljs.core.nth.call(null, e, 0, null);
          e = cljs.core.nth.call(null, e, 1, null);
          lt.objs.clients.cancel_all_BANG_.call(null, e);
          d += 1;
        } else {
          if (a = cljs.core.seq.call(null, a)) {
            cljs.core.chunked_seq_QMARK_.call(null, a) ? (c = cljs.core.chunk_first.call(null, a), a = cljs.core.chunk_rest.call(null, a), b = c, c = cljs.core.count.call(null, c)) : (b = cljs.core.first.call(null, a), cljs.core.nth.call(null, b, 0, null), e = cljs.core.nth.call(null, b, 1, null), lt.objs.clients.cancel_all_BANG_.call(null, e), a = cljs.core.next.call(null, a), b = null, c = 0), d = 0;
          } else {
            return null;
          }
        }
      }
    } else {
      return null;
    }
  } else {
    return null;
  }
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.disconnect-clients", "editor.disconnect-clients", 1348759402), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Disconnect clients attached to editor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    for (var a = cljs.core.seq.call(null, cljs.core.vals.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), b = null, c = 0, d = 0;;) {
      if (d < c) {
        var e = cljs.core._nth.call(null, b, d);
        lt.objs.clients.close_BANG_.call(null, e);
        d += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.objs.clients.close_BANG_.call(null, e), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
        } else {
          return null;
        }
      }
    }
  } else {
    return null;
  }
}], null));
lt.objs.connector = {};
lt.objs.connector.__BEH__on_selected = function(a, b) {
  var c = (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  cljs.core.truth_(c) && c.call(null, b);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.connector", "on-selected", "lt.objs.connector/on-selected", 554282612), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.connector.__BEH__on_selected, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), null], null), null));
lt.objs.connector.__BEH__on_close_BANG_ = function(a) {
  lt.object.raise.call(null, (new cljs.core.Keyword(null, "popup", "popup", 1120756766)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "close!", "close!", 3951350939));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.connector", "on-close!", "lt.objs.connector/on-close!", 4610609218), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.connector.__BEH__on_close_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], null), null));
lt.objs.connector.client_button = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li.button", "li.button", 2481585205), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", 
  "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selected", "selected", 2205476365), b);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.connector", "client-selector", "lt.objs.connector/client-selector", 4663980940), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "client.selector", "client.selector", 3112958484), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b, c) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "cb", "cb", 1013907409), c, new cljs.core.Keyword(null, "popup", "popup", 1120756766), lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Which client?", new cljs.core.Keyword(null, "body", "body", 1016933652), cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), cljs.core.map.call(null, cljs.core.partial.call(null, lt.objs.connector.client_button, a), b)], null)), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "There are multiple clients that could potentially handle this.\n                                                            Which one do you want us to use for this file?"], 
  null))], null))], null));
  return null;
});
lt.objs.connector.__BEH__select_client = function(a, b, c) {
  return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.connector", "client-selector", "lt.objs.connector/client-selector", 4663980940), b, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.connector", "select-client", "lt.objs.connector/select-client", 1181118821), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.connector.__BEH__select_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select-client", "select-client", 4292921646), null], null), null));
lt.object.add_behavior_BANG_.call(null, lt.objs.eval.evaler, new cljs.core.Keyword("lt.objs.connector", "select-client", "lt.objs.connector/select-client", 1181118821));
lt.objs.proc = {};
lt.objs.proc.shell = lt.util.load.node_module.call(null, "shelljs");
lt.objs.proc.spawn = require("child_process").spawn;
lt.objs.proc.custom_env = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.proc.procs = cljs.core.atom.call(null, cljs.core.PersistentHashSet.EMPTY);
lt.objs.proc.add_BANG_ = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.objs.proc.procs, cljs.core.conj, a);
};
lt.objs.proc.rem_BANG_ = function(a) {
  return cljs.core.swap_BANG_.call(null, lt.objs.proc.procs, cljs.core.disj, a);
};
lt.objs.proc.kill = function(a) {
  return a.kill();
};
lt.objs.proc.kill_all = function() {
  var a = function(a) {
    a = cljs.core.nth.call(null, a, 0, null);
    a = cljs.core.seq.call(null, cljs.core.truth_(a) ? a : cljs.core.deref.call(null, lt.objs.proc.procs));
    for (var b = null, e = 0, f = 0;;) {
      if (f < e) {
        var g = cljs.core._nth.call(null, b, f);
        lt.objs.proc.kill.call(null, g);
        f += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), e = cljs.core.chunk_rest.call(null, b), b = a, g = cljs.core.count.call(null, a), a = e, e = g) : (g = cljs.core.first.call(null, b), lt.objs.proc.kill.call(null, g), a = cljs.core.next.call(null, b), b = null, e = 0), f = 0;
        } else {
          return null;
        }
      }
    }
  }, b = function(b) {
    var d = null;
    0 < arguments.length && (d = cljs.core.array_seq(Array.prototype.slice.call(arguments, 0), 0));
    return a.call(this, d);
  };
  b.cljs$lang$maxFixedArity = 0;
  b.cljs$lang$applyTo = function(b) {
    b = cljs.core.seq(b);
    return a(b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.proc.parse_commands = function(a) {
  a = clojure.string.split.call(null, a, "|");
  return function c(a) {
    return new cljs.core.LazySeq(null, function() {
      for (;;) {
        var e = cljs.core.seq.call(null, a);
        if (e) {
          if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
            var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
            a: {
              for (var k = 0;;) {
                if (k < g) {
                  var l = cljs.core._nth.call(null, f, k), l = cljs.core.filter.call(null, cljs.core.complement.call(null, cljs.core.empty_QMARK_), cljs.core.re_seq.call(null, /(?:(?:\\\s)|[^\s\"'])+|\"[^\"]*\"|'[^']*'/, l));
                  cljs.core.chunk_append.call(null, h, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "command", "command", 1964298941), cljs.core.first.call(null, l), new cljs.core.Keyword(null, "args", "args", 1016906831), cljs.core.rest.call(null, l)], null));
                  k += 1;
                } else {
                  f = !0;
                  break a;
                }
              }
              f = void 0;
            }
            return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
          }
          h = cljs.core.first.call(null, e);
          h = cljs.core.filter.call(null, cljs.core.complement.call(null, cljs.core.empty_QMARK_), cljs.core.re_seq.call(null, /(?:(?:\\\s)|[^\s\"'])+|\"[^\"]*\"|'[^']*'/, h));
          return cljs.core.cons.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "command", "command", 1964298941), cljs.core.first.call(null, h), new cljs.core.Keyword(null, "args", "args", 1016906831), cljs.core.rest.call(null, h)], null), c.call(null, cljs.core.rest.call(null, e)));
        }
        return null;
      }
    }, null, null);
  }.call(null, a);
};
lt.objs.proc.merge_env = function(a) {
  return cljs.core.not.call(null, a) ? process.env : cljs.core.clj__GT_js.call(null, cljs.core.merge.call(null, cljs.core.into.call(null, cljs.core.PersistentArrayMap.EMPTY, function() {
    return function c(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, a);
          if (e) {
            if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
              var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
              a: {
                for (var k = 0;;) {
                  if (k < g) {
                    var l = cljs.core._nth.call(null, f, k);
                    cljs.core.chunk_append.call(null, h, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [l, process.env[l]], null));
                    k += 1;
                  } else {
                    f = !0;
                    break a;
                  }
                }
                f = void 0;
              }
              return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
            }
            h = cljs.core.first.call(null, e);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [h, process.env[h]], null), c.call(null, cljs.core.rest.call(null, e)));
          }
          return null;
        }
      }, null, null);
    }.call(null, Object.keys(process.env));
  }()), a, cljs.core.deref.call(null, lt.objs.proc.custom_env)));
};
lt.objs.proc.simple_spawn_STAR_ = function(a, b, c, d) {
  b = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b;
  var e = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "args", "args", 1016906831)), f = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "command", "command", 1964298941)), g = lt.objs.proc.spawn.call(null, f, cljs.core.seq.call(null, e) ? cljs.core.clj__GT_js.call(null, e) : null, {cwd:c, env:lt.objs.proc.merge_env.call(null, d)});
  lt.objs.proc.add_BANG_.call(null, g);
  g.on("exit", cljs.core.partial.call(null, lt.objs.proc.rem_BANG_, g));
  g.on("error", function(b) {
    return cljs.core.truth_(cljs.core.deref.call(null, a)) ? (cljs.core.println.call(null, "" + cljs.core.str(b), -1 < ("" + cljs.core.str(b)).indexOf("ENOENT")), -1 < ("" + cljs.core.str(b)).indexOf("ENOENT") ? (lt.object.raise.call(null, a, new cljs.core.Keyword(null, "proc.error", "proc.error", 4143512802), [cljs.core.str("Could not find command: "), cljs.core.str(f)].join("")), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "proc.exit", "proc.exit", 4162906152)), g.kill()) : lt.object.raise.call(null, 
    a, new cljs.core.Keyword(null, "proc.error", "proc.error", 4143512802), b)) : null;
  });
  g.stderr.on("data", function(b) {
    return cljs.core.not.call(null, cljs.core.deref.call(null, a)) ? cljs.core.println.call(null, "ERROR running: ", f) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "proc.error", "proc.error", 4143512802), b);
  });
  g.stdout.on("data", function(b) {
    return cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "proc.out", "proc.out", 4302083112), b) : null;
  });
  return g.on("exit", function(b) {
    return cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "proc.exit", "proc.exit", 4162906152), b) : null;
  }, g);
};
lt.objs.proc.exec = function(a) {
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a, c = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "args", "args", 1016906831)), d = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "env", "env", 1014004831)), e = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "cwd", "cwd", 1014003170)), f = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "obj", "obj", 1014014057)), g = cljs.core.get.call(null, b, new cljs.core.Keyword(null, 
  "command", "command", 1964298941)), h = cljs.core.not.call(null, c) ? lt.objs.proc.parse_commands.call(null, g) : new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [b], null), k = cljs.core.doall.call(null, function() {
    return function(a, b, c, d, e, f, g, h, k) {
      return function w(A) {
        return new cljs.core.LazySeq(null, function(a, b, c, d, e, f, g, h, k) {
          return function() {
            for (;;) {
              var a = cljs.core.seq.call(null, A);
              if (a) {
                if (cljs.core.chunked_seq_QMARK_.call(null, a)) {
                  var b = cljs.core.chunk_first.call(null, a), c = cljs.core.count.call(null, b), d = cljs.core.chunk_buffer.call(null, c);
                  a: {
                    for (var h = 0;;) {
                      if (h < c) {
                        var k = cljs.core._nth.call(null, b, h);
                        cljs.core.chunk_append.call(null, d, lt.objs.proc.simple_spawn_STAR_.call(null, g, k, f, e));
                        h += 1;
                      } else {
                        b = !0;
                        break a;
                      }
                    }
                    b = void 0;
                  }
                  return b ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), w.call(null, cljs.core.chunk_rest.call(null, a))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, d), null);
                }
                d = cljs.core.first.call(null, a);
                return cljs.core.cons.call(null, lt.objs.proc.simple_spawn_STAR_.call(null, g, d, f, e), w.call(null, cljs.core.rest.call(null, a)));
              }
              return null;
            }
          };
        }(a, b, c, d, e, f, g, h, k), null, null);
      };
    }(a, b, b, c, d, e, f, g, h).call(null, h);
  }());
  lt.object.merge_BANG_.call(null, f, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "procs", "procs", 1120844623), k], null));
  return null;
};
lt.objs.proc.__BEH__kill_procs_on_close = function(a) {
  return lt.objs.proc.kill_all.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "kill-procs-on-close", "lt.objs.proc/kill-procs-on-close", 3952147241), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.proc.__BEH__kill_procs_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closed", "closed", 3951351006), null], null), null));
lt.object.add_behavior_BANG_.call(null, lt.objs.app.app, new cljs.core.Keyword("lt.objs.proc", "kill-procs-on-close", "lt.objs.proc/kill-procs-on-close", 3952147241));
lt.objs.proc.__BEH__print_all = function(a, b) {
  return cljs.core.println.call(null, "PROC: ", b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "print-all", "lt.objs.proc/print-all", 2960515937), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.proc.__BEH__print_all, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "proc.out", "proc.out", 4302083112), null, new cljs.core.Keyword(null, "proc.exit", "proc.exit", 4162906152), 
null, new cljs.core.Keyword(null, "proc.error", "proc.error", 4143512802), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "test-printer", "lt.objs.proc/test-printer", 4004228547), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "behaviors", "behaviors", 607554515), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.proc", "print-all", "lt.objs.proc/print-all", 2960515937)], null), new cljs.core.Keyword(null, 
"init", "init", 1017141378), function() {
  return null;
});
lt.objs.proc.printer = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.proc", "test-printer", "lt.objs.proc/test-printer", 4004228547));
lt.objs.proc.find_path_files = function() {
  return cljs.core.filter.call(null, lt.objs.files.exists_QMARK_, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.files.home.call(null, ".profile"), lt.objs.files.home.call(null, ".bash_profile")], null));
};
lt.objs.proc.get_path_command = function() {
  return[cljs.core.str(cljs.core.reduce.call(null, function(a, b) {
    return[cljs.core.str(a), cljs.core.str("source "), cljs.core.str(b), cljs.core.str(" \x26\x26 ")].join("");
  }, "", lt.objs.proc.find_path_files.call(null))), cljs.core.str("echo $PATH")].join("");
};
lt.objs.proc.etc_paths__GT_PATH = function() {
  if (cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, "/etc/paths"))) {
    return "";
  }
  var a = clojure.string.split.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, "/etc/paths")), "\n"), a = cljs.core.reduce.call(null, cljs.core.str, cljs.core.interpose.call(null, ":", cljs.core.filter.call(null, cljs.core.complement.call(null, cljs.core.empty_QMARK_), a)));
  return[cljs.core.str("PATH\x3d"), cljs.core.str(a), cljs.core.str(":$PATH \x26\x26 ")].join("");
};
lt.objs.proc.__BEH__set_path_OSX = function(a) {
  return lt.objs.platform.mac_QMARK_.call(null) && cljs.core.not.call(null, process.env.LTCLI) ? require("child_process").exec([cljs.core.str(lt.objs.proc.etc_paths__GT_PATH.call(null)), cljs.core.str(lt.objs.proc.get_path_command.call(null))].join(""), function(a, c, d) {
    if (cljs.core.empty_QMARK_.call(null, a)) {
      return cljs.core.empty_QMARK_.call(null, c) ? null : process.env.PATH = c;
    }
    lt.objs.notifos.set_msg_BANG_.call(null, "Failed to source PATH files. See console log for details.", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
    return console.error(a);
  }) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "set-path-OSX", "lt.objs.proc/set-path-OSX", 1465476923), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.proc.__BEH__set_path_OSX, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.proc.__BEH__global_path = function(a, b) {
  return process.env.PATH = b;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "global-path", "lt.objs.proc/global-path", 3390755827), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.proc.__BEH__global_path, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: set global PATH for processes", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "path"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 2700522E3), 
!0);
lt.objs.proc.__BEH__global_env = function(a, b) {
  return cljs.core.reset_BANG_.call(null, lt.objs.proc.custom_env, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.proc", "global-env", "lt.objs.proc/global-env", 3363957799), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.proc.__BEH__global_env, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: add to the global ENV for processes", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "env map"], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549), new cljs.core.Keyword(null, "exclusive", "exclusive", 
2700522E3), !0);
lt.objs.proc.var_caps = function(a) {
  return lt.objs.platform.win_QMARK_.call(null) ? [cljs.core.str("echo "), cljs.core.str(cljs.core.apply.call(null, cljs.core.str, cljs.core.map.call(null, function(a) {
    return[cljs.core.str("%"), cljs.core.str(a), cljs.core.str("%;")].join("");
  }, a)))].join("") : [cljs.core.str('echo "'), cljs.core.str(cljs.core.apply.call(null, cljs.core.str, cljs.core.map.call(null, function(a) {
    return[cljs.core.str("$"), cljs.core.str(a), cljs.core.str(";")].join("");
  }, a))), cljs.core.str('"')].join("");
};
lt.objs.proc.capture = function(a, b, c) {
  return require("child_process").exec([cljs.core.str(a), cljs.core.str(" \x26\x26 "), cljs.core.str(lt.objs.proc.var_caps.call(null, b))].join(""), function(a, e, f) {
    a = cljs.core.zipmap.call(null, b, clojure.string.split.call(null, e, ";"));
    return c.call(null, a);
  });
};
lt.objs.thread = {};
lt.objs.thread.cp = require("child_process");
lt.objs.thread.__BEH__try_send = function(a, b) {
  return cljs.core.not.call(null, (new cljs.core.Keyword(null, "connected", "connected", 4729661051)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "queue!", "queue!", 4360174754), b) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "try-send", "lt.objs.thread/try-send", 1561926143), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__try_send, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), null], null), null));
lt.objs.thread.__BEH__queue_BANG_ = function(a, b) {
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "queue", "queue", 1121848451)], null), cljs.core.conj, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "queue!", "lt.objs.thread/queue!", 1667114793), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__queue_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "queue!", "queue!", 4360174754), null], null), null));
lt.objs.thread.__BEH__send_BANG_ = function(a, b) {
  return(new cljs.core.Keyword(null, "worker", "worker", 4526786288)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).send(cljs.core.clj__GT_js.call(null, b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "send!", "lt.objs.thread/send!", 2752302802), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__send_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "send!", "send!", 1123226891), null], null), null));
lt.objs.thread.__BEH__connect = function(a) {
  for (var b = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "queue", "queue", 1121848451)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.object.raise.call(null, a, new cljs.core.Keyword(null, "send!", "send!", 1123226891), b), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "connected", "connected", 4729661051), !0, new cljs.core.Keyword(null, "queue", "queue", 1121848451), cljs.core.PersistentVector.EMPTY], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "connect", "lt.objs.thread/connect", 4665947759), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__connect, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), null], null), null));
lt.objs.thread.__BEH__message = function(a, b) {
  var c = lt.object.by_id.call(null, b.obj);
  return cljs.core.truth_(c) ? lt.object.raise.call(null, c, b.msg instanceof cljs.core.Keyword ? b.msg : cljs.core.keyword.call(null, b.msg), cljs.core._EQ_.call(null, "clj", b.format) ? cljs.reader.read_string.call(null, b.res) : b.res) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "message", "lt.objs.thread/message", 4662440292), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__message, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "message", "message", 1968829305), null], null), null));
lt.objs.thread.__BEH__kill_BANG_ = function(a) {
  return(new cljs.core.Keyword(null, "worker", "worker", 4526786288)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).kill();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "kill!", "lt.objs.thread/kill!", 2826681832), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__kill_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "kill!", "kill!", 1115956213), null], null), null));
lt.objs.thread.__BEH__shutdown_worker_on_close = function(a) {
  return lt.object.raise.call(null, lt.objs.thread.worker, new cljs.core.Keyword(null, "kill!", "kill!", 1115956213));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "shutdown-worker-on-close", "lt.objs.thread/shutdown-worker-on-close", 2634641895), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.thread.__BEH__shutdown_worker_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closed", "closed", 3951351006), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.thread", "worker-thread", "lt.objs.thread/worker-thread", 1400507698), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "worker-thread", "worker-thread", 3011956395), null], null), null), new cljs.core.Keyword(null, "queue", "queue", 1121848451), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "init", "init", 
1017141378), function(a) {
  var b = lt.objs.thread.cp.fork(lt.objs.files.lt_home.call(null, "/core/node_modules/lighttable/background/threadworker.js"), cljs.core.clj__GT_js.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["--harmony"], null)), cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "execPath", "execPath", 3055801288), process.execPath, new cljs.core.Keyword(null, "silent", "silent", 4406544327), !0, new cljs.core.Keyword(null, 
  "env", "env", 1014004831), new cljs.core.PersistentArrayMap(null, 1, ["ATOM_SHELL_INTERNAL_RUN_AS_NODE", 1], null), new cljs.core.Keyword(null, "cwd", "cwd", 1014003170), lt.objs.files.cwd], null)));
  b.stdout.on("data", function(a) {
    return lt.objs.console.loc_log.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "file", "file", 1017047278), "thread", new cljs.core.Keyword(null, "line", "line", 1017226086), "stdout", new cljs.core.Keyword(null, "content", "content", 1965434859), "" + cljs.core.str(a)], null));
  });
  b.stderr.on("data", function(a) {
    return lt.objs.console.loc_log.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "file", "file", 1017047278), "thread", new cljs.core.Keyword(null, "line", "line", 1017226086), "stderr", new cljs.core.Keyword(null, "content", "content", 1965434859), "" + cljs.core.str(a), new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  });
  b.on("message", function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "message", "message", 1968829305), b);
  });
  b.send(cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "msg", "msg", 1014012659), "init", new cljs.core.Keyword(null, "obj", "obj", 1014014057), lt.object.__GT_id.call(null, a), new cljs.core.Keyword(null, "ltpath", "ltpath", 4216414495), lt.objs.files.lt_home.call(null)], null)));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "worker", "worker", 4526786288), b], null));
  return null;
});
lt.objs.thread.send = function(a) {
  return lt.object.raise.call(null, lt.objs.thread.worker, new cljs.core.Keyword(null, "try-send!", "try-send!", 4325864057), a);
};
lt.objs.thread.thread_STAR_ = function(a) {
  a = [cljs.core.str(""), cljs.core.str(a)].join("");
  var b = cljs.core.gensym.call(null, "theadfunc");
  lt.objs.thread.send.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "msg", "msg", 1014012659), "register", new cljs.core.Keyword(null, "name", "name", 1017277949), b, new cljs.core.Keyword(null, "func", "func", 1017058870), a], null));
  return function() {
    var a = function(a, c) {
      return lt.objs.thread.send.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "msg", "msg", 1014012659), "call", new cljs.core.Keyword(null, "name", "name", 1017277949), b, new cljs.core.Keyword(null, "obj", "obj", 1014014057), lt.object.__GT_id.call(null, a), new cljs.core.Keyword(null, "params", "params", 4313443576), cljs.core.map.call(null, cljs.core.pr_str, c)], null));
    }, d = function(b, d) {
      var g = null;
      1 < arguments.length && (g = cljs.core.array_seq(Array.prototype.slice.call(arguments, 1), 0));
      return a.call(this, b, g);
    };
    d.cljs$lang$maxFixedArity = 1;
    d.cljs$lang$applyTo = function(b) {
      var d = cljs.core.first(b);
      b = cljs.core.rest(b);
      return a(d, b);
    };
    d.cljs$core$IFn$_invoke$arity$variadic = a;
    return d;
  }();
};
lt.object.tag_behaviors.call(null, new cljs.core.Keyword(null, "worker-thread", "worker-thread", 3011956395), new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.objs.thread", "kill!", "lt.objs.thread/kill!", 2826681832), new cljs.core.Keyword("lt.objs.thread", "connect", "lt.objs.thread/connect", 4665947759), new cljs.core.Keyword("lt.objs.thread", "send!", "lt.objs.thread/send!", 2752302802), new cljs.core.Keyword("lt.objs.thread", "queue!", 
"lt.objs.thread/queue!", 1667114793), new cljs.core.Keyword("lt.objs.thread", "try-send", "lt.objs.thread/try-send", 1561926143), new cljs.core.Keyword("lt.objs.thread", "message", "lt.objs.thread/message", 4662440292)], null));
lt.objs.thread.worker = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.thread", "worker-thread", "lt.objs.thread/worker-thread", 1400507698));
lt.plugins.auto_complete = {};
lt.plugins.auto_complete.stream = function(a) {
  return new CodeMirror.StringStream(a);
};
lt.plugins.auto_complete.advance = function(a) {
  return a.start = a.pos;
};
lt.plugins.auto_complete.next_STAR_ = function(a) {
  return a.next();
};
lt.plugins.auto_complete.current = function(a) {
  return a.current();
};
lt.plugins.auto_complete.peek_STAR_ = function(a) {
  return a.peek();
};
lt.plugins.auto_complete.skip_space = function(a) {
  return cljs.core.truth_(function() {
    var b = lt.plugins.auto_complete.peek_STAR_.call(null, a);
    return cljs.core.truth_(b) ? cljs.core.re_seq.call(null, /\s/, lt.plugins.auto_complete.peek_STAR_.call(null, a)) : b;
  }()) ? (a.eatSpace(), lt.plugins.auto_complete.advance.call(null, a)) : null;
};
lt.plugins.auto_complete.eat_while = function(a, b) {
  return a.eatWhile(b);
};
lt.plugins.auto_complete.string__GT_tokens = function(a, b) {
  var c = lt.plugins.auto_complete.stream.call(null, a), d = {};
  for (lt.plugins.auto_complete.skip_space.call(null, c);;) {
    if (cljs.core.truth_(lt.plugins.auto_complete.peek_STAR_.call(null, c))) {
      lt.plugins.auto_complete.eat_while.call(null, c, b), cljs.core.empty_QMARK_.call(null, lt.plugins.auto_complete.current.call(null, c)) ? lt.plugins.auto_complete.next_STAR_.call(null, c) : d[lt.plugins.auto_complete.current.call(null, c)] = !0, lt.plugins.auto_complete.advance.call(null, c), lt.plugins.auto_complete.skip_space.call(null, c);
    } else {
      break;
    }
  }
  return cljs.core.into_array.call(null, cljs.core.map.call(null, function(a) {
    return{completion:a};
  }, Object.keys(d)));
};
lt.plugins.auto_complete.default_pattern = /[\w_$]/;
lt.plugins.auto_complete.get_pattern = function(a) {
  var b = lt.objs.editor.inner_mode.call(null, a);
  a = (new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  if (cljs.core.truth_(a)) {
    return a;
  }
  b = b["hint-pattern"];
  return cljs.core.truth_(b) ? b : lt.plugins.auto_complete.default_pattern;
};
lt.plugins.auto_complete.get_token = function(a, b) {
  var c = lt.objs.editor.line.call(null, a, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b)), d = lt.plugins.auto_complete.get_pattern.call(null, a), c = lt.plugins.auto_complete.stream.call(null, c), e = (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(b);
  for (lt.plugins.auto_complete.skip_space.call(null, c);;) {
    lt.plugins.auto_complete.eat_while.call(null, c, d);
    if (!cljs.core.empty_QMARK_.call(null, lt.plugins.auto_complete.current.call(null, c)) && c.start <= e && c.pos >= e) {
      return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "start", "start", 1123661780), c.start, new cljs.core.Keyword(null, "end", "end", 1014004813), c.pos, new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "string", "string", 4416885635), lt.plugins.auto_complete.current.call(null, c)], null);
    }
    if (cljs.core.not.call(null, lt.plugins.auto_complete.peek_STAR_.call(null, c))) {
      return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "start", "start", 1123661780), (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "end", "end", 1014004813), (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(b)], null)
      ;
    }
    lt.plugins.auto_complete.next_STAR_.call(null, c);
    lt.plugins.auto_complete.advance.call(null, c);
    lt.plugins.auto_complete.skip_space.call(null, c);
  }
};
lt.plugins.auto_complete.non_token_change_QMARK_ = function(a, b) {
  var c = lt.plugins.auto_complete.get_pattern.call(null, a), d = cljs.core.map.call(null, cljs.core.str, b.text), e = cljs.core._EQ_, f = b.origin;
  return cljs.core.truth_(e.call(null, "+input", f)) ? cljs.core.some.call(null, function(a) {
    return cljs.core.not.call(null, cljs.core.re_seq.call(null, c, a));
  }, d) : cljs.core.truth_(e.call(null, "paste", f)) ? !0 : !1;
};
lt.plugins.auto_complete.w = lt.objs.thread.thread_STAR_.call(null, function() {
  var a = argsArray(arguments), b = a.shift(), c = a.map(cljs.reader.read_string);
  (function(a, b, c) {
    return function(a, b, c) {
      return _send(a, b, cljs.core.pr_str.call(null, c), "clj");
    };
  })(a, b, c);
  c.unshift(b.obj);
  return function(a, b) {
    var c = require([cljs.core.str(ltpath), cljs.core.str("/core/node_modules/codemirror/addon/runmode/runmode.node.js")].join("")).StringStream, g = function(a) {
      return function(b) {
        return new a(b);
      };
    }(c), h = function(a, b) {
      return function(a) {
        return a.start = a.pos;
      };
    }(c, g), k = function(a, b, c) {
      return function(a) {
        return a.next();
      };
    }(c, g, h), l = function(a, b, c, d) {
      return function(a) {
        return a.peek();
      };
    }(c, g, h, k), m = function(a, b, c, d, e) {
      return function(a) {
        return a.current();
      };
    }(c, g, h, k, l), n = function(a, b, c, d, e, f) {
      return function(a) {
        return cljs.core.truth_(function() {
          var b = e.call(null, a);
          return cljs.core.truth_(b) ? cljs.core.re_seq.call(null, /\s/, e.call(null, a)) : b;
        }()) ? (a.eatSpace(), c.call(null, a)) : null;
      };
    }(c, g, h, k, l, m), p = function(a, b, c, d, e, f, g) {
      return function(a, b) {
        return a.eatWhile(b);
      };
    }(c, g, h, k, l, m, n), c = function(a, b, c, d, e, f, g, h) {
      return function(k, l) {
        var m = b.call(null, k), n = cljs.core.re_pattern.call(null, l), p = {};
        for (g.call(null, m);;) {
          if (cljs.core.truth_(e.call(null, m))) {
            h.call(null, m, n), cljs.core.empty_QMARK_.call(null, f.call(null, m)) ? d.call(null, m) : p[f.call(null, m)] = !0, c.call(null, m), g.call(null, m);
          } else {
            break;
          }
        }
        return cljs.core.into_array.call(null, cljs.core.map.call(null, function(a, b, c, d, e, f, g, h, k, l, m) {
          return function(a) {
            return{completion:a};
          };
        }(m, n, p, a, b, c, d, e, f, g, h), Object.keys(p)));
      };
    }(c, g, h, k, l, m, n, p);
    return _send(a, new cljs.core.Keyword(null, "hint-tokens", "hint-tokens", 3416256274), c.call(null, (new cljs.core.Keyword(null, "string", "string", 4416885635)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "pattern", "pattern", 4517781250)).cljs$core$IFn$_invoke$arity$1(b)));
  }.apply(null, c);
});
lt.plugins.auto_complete.async_hints = function(a) {
  return cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.plugins.auto_complete.w.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "string", "string", 4416885635), lt.objs.editor.__GT_val.call(null, a), new cljs.core.Keyword(null, "pattern", "pattern", 4517781250), lt.plugins.auto_complete.get_pattern.call(null, a).source], null)) : null;
};
lt.plugins.auto_complete.text_BAR_completion = function(a) {
  var b = a.text;
  return cljs.core.truth_(b) ? b : a.completion;
};
lt.plugins.auto_complete.text_PLUS_completion = function(a) {
  return[cljs.core.str(a.text), cljs.core.str(a.completion)].join("");
};
lt.plugins.auto_complete.distinct_completions = function(a) {
  var b = {};
  return cljs.core.filter.call(null, function(a) {
    return!0 === b[a.completion] ? !1 : b[a.completion] = !0;
  }, a);
};
lt.plugins.auto_complete.remove_long_completions = function(a) {
  return cljs.core.filter.call(null, function(a) {
    return a.completion.length < (new cljs.core.Keyword(null, "hint-limit", "hint-limit", 945287271)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter));
  }, a);
};
lt.plugins.auto_complete.hinter = lt.object.add_tags.call(null, lt.objs.sidebar.command.filter_list.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "items", "items", 1114430258), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    var b = (new cljs.core.Keyword(null, "string", "string", 4416885635)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "starting-token", "starting-token", 3199431070)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)));
    return lt.plugins.auto_complete.distinct_completions.call(null, lt.plugins.auto_complete.remove_long_completions.call(null, cljs.core.truth_(b) ? cljs.core.remove.call(null, function(a) {
      return cljs.core._EQ_.call(null, b, a.completion);
    }, lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "hints+", "hints+", 4091697745), cljs.core.PersistentVector.EMPTY, b)) : lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "hints+", "hints+", 4091697745), cljs.core.PersistentVector.EMPTY)));
  }
  return null;
}, new cljs.core.Keyword(null, "key", "key", 1014010321), lt.plugins.auto_complete.text_BAR_completion], null)), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "hinter", "hinter", 4091697382)], null));
lt.plugins.auto_complete.on_line_change = function(a, b) {
  return lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "line-change", "line-change", 3952584475), a, b);
};
lt.plugins.auto_complete.__BEH__set_hint_limit = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-limit", "hint-limit", 945287271), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "set-hint-limit", "lt.plugins.auto-complete/set-hint-limit", 1014037643), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__set_hint_limit, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Auto-complete: Set maximum length of an autocomplete hint", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
[new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Number", new cljs.core.Keyword(null, "example", "example", 3985900764), 1E3], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.plugins.auto_complete.__BEH__textual_hints = function(a, b) {
  return cljs.core.concat.call(null, (new cljs.core.Keyword("lt.plugins.auto-complete", "hints", "lt.plugins.auto-complete/hints", 3881612567)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "textual-hints", "lt.plugins.auto-complete/textual-hints", 1172342809), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__textual_hints, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hints+", "hints+", 4091697745), null], null), null));
lt.plugins.auto_complete.__BEH__escape_BANG_ = function(a, b) {
  var c = lt.object.__GT_content.call(null, a);
  cljs.core.truth_((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && CodeMirror.off((new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), "change", lt.plugins.auto_complete.on_line_change);
  lt.objs.context.out_BANG_.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372)], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "active", "active", 3885920888), !1, new cljs.core.Keyword(null, "selected", "selected", 2205476365), 0, new cljs.core.Keyword(null, "ed", "ed", 1013907473), null, new cljs.core.Keyword(null, "starting-token", "starting-token", 3199431070), null, new cljs.core.Keyword(null, "token", "token", 1124445547), null, new cljs.core.Keyword(null, "search", "search", 4402534682), ""], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  return cljs.core.truth_(lt.util.dom.parent.call(null, c)) ? lt.util.dom.remove.call(null, c) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "escape!", "lt.plugins.auto-complete/escape!", 2293504011), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__escape_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "escape!", "escape!", 3844244274), null], null), null));
lt.plugins.auto_complete.__BEH__select = function(a, b) {
  var c = (new cljs.core.Keyword(null, "token", "token", 1124445547)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "ch", "ch", 1013907415), (new cljs.core.Keyword(null, "start", "start", 1123661780)).cljs$core$IFn$_invoke$arity$1(c)], null), c = new cljs.core.PersistentArrayMap(null, 
  2, [new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "ch", "ch", 1013907415), (new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(c)], null);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), !1], null));
  cljs.core.truth_(b.select) ? b.select.call(null, cljs.core.partial.call(null, lt.objs.editor.replace, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d, c), b) : lt.objs.editor.replace.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d, c, b.completion);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "select", "lt.plugins.auto-complete/select", 3556785863), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__select, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.plugins.auto_complete.__BEH__select_unknown = function(a, b) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274));
  return lt.objs.keyboard.passthrough.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "select-unknown", "lt.plugins.auto-complete/select-unknown", 1183091522), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__select_unknown, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select-unknown", "select-unknown", 2733767659), null], 
null), null));
lt.plugins.auto_complete.__BEH__line_change = function(a, b, c) {
  if (cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)))) {
    var d = lt.objs.editor.__GT_cursor.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    b = lt.plugins.auto_complete.get_token.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d);
    if (cljs.core.truth_(function() {
      var b = lt.plugins.auto_complete.non_token_change_QMARK_.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c);
      return cljs.core.truth_(b) ? b : (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(d) < (new cljs.core.Keyword(null, "start", "start", 1123661780)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "starting-token", "starting-token", 3199431070)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)));
    }())) {
      return lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274));
    }
    lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "change!", "change!", 1752847843), (new cljs.core.Keyword(null, "string", "string", 4416885635)).cljs$core$IFn$_invoke$arity$1(b));
    cljs.core._EQ_.call(null, 0, cljs.core.count.call(null, (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)))) ? lt.objs.context.out_BANG_.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372), new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 
    2936258401)], null)) : cljs.core.truth_(lt.objs.context.in_QMARK_.call(null, new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372))) || (lt.objs.context.in_BANG_.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401)], null), lt.plugins.auto_complete.hinter), lt.objs.context.in_BANG_.call(null, new cljs.core.PersistentVector(null, 
    1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372)], null), (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))));
    return lt.object.merge_BANG_.call(null, lt.plugins.auto_complete.hinter, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "token", "token", 1124445547), b], null));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "line-change", "lt.plugins.auto-complete/line-change", 2938041394), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__line_change, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "line-change", "line-change", 3952584475), null], null), null));
lt.plugins.auto_complete.__BEH__async_hint_tokens = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword("lt.plugins.auto-complete", "hints", "lt.plugins.auto-complete/hints", 3881612567), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "async-hint-tokens", "lt.plugins.auto-complete/async-hint-tokens", 2432908764), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__async_hint_tokens, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-tokens", "hint-tokens", 3416256274), null], 
null), null));
lt.plugins.auto_complete.__BEH__intra_buffer_string_hints = function(a, b) {
  return cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)), a) || cljs.core.not.call(null, (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))) ? lt.plugins.auto_complete.async_hints.call(null, a) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "intra-buffer-string-hints", "lt.plugins.auto-complete/intra-buffer-string-hints", 3686435669), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__intra_buffer_string_hints, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "change", "change", 3947235106), 
null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 400);
lt.plugins.auto_complete.start_hinting = function() {
  var a = null, b = function(b) {
    return a.call(null, b, null);
  }, c = function(a, b) {
    var c = lt.objs.editor.__GT_cursor.call(null, a), g = lt.plugins.auto_complete.get_token.call(null, a, c), c = lt.objs.editor.line_handle.call(null, a, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c)), h = lt.object.__GT_content.call(null, lt.plugins.auto_complete.hinter);
    lt.objs.context.in_BANG_.call(null, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372)], null), a);
    lt.object.merge_BANG_.call(null, lt.plugins.auto_complete.hinter, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "token", "token", 1124445547), g, new cljs.core.Keyword(null, "starting-token", "starting-token", 3199431070), g, new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "active", "active", 3885920888), !0, new cljs.core.Keyword(null, "line", "line", 1017226086), c], null));
    lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "change!", "change!", 1752847843), (new cljs.core.Keyword(null, "string", "string", 4416885635)).cljs$core$IFn$_invoke$arity$1(g));
    lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "active", "active", 3885920888));
    var k = cljs.core.count.call(null, (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)));
    return cljs.core._EQ_.call(null, 0, k) ? lt.objs.context.out_BANG_.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "editor.keys.hinting.active", "editor.keys.hinting.active", 2111066372), new cljs.core.Keyword(null, "filter-list.input", "filter-list.input", 2936258401)], null)) : cljs.core.truth_(function() {
      var a = cljs.core._EQ_.call(null, 1, k);
      return a ? (new cljs.core.Keyword(null, "select-single", "select-single", 4748368299)).cljs$core$IFn$_invoke$arity$1(b) : a;
    }()) ? lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "select!", "select!", 2992004631), 0) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (CodeMirror.on(c, "change", lt.plugins.auto_complete.on_line_change), lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "body", "body", 1016933652)), h), CodeMirror.positionHint(lt.objs.editor.__GT_cm_ed.call(null, a), h, (new cljs.core.Keyword(null, "start", "start", 1123661780)).cljs$core$IFn$_invoke$arity$1(g))) : 
    null;
  }, a = function(a, e) {
    switch(arguments.length) {
      case 1:
        return b.call(this, a);
      case 2:
        return c.call(this, a, e);
    }
    throw Error("Invalid arity: " + arguments.length);
  };
  a.cljs$core$IFn$_invoke$arity$1 = b;
  a.cljs$core$IFn$_invoke$arity$2 = c;
  return a;
}();
lt.plugins.auto_complete.__BEH__show_hint = function(a, b) {
  var c = clojure.string.trim.call(null, lt.objs.editor.get_char.call(null, a, -1)), d = cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select-single", "select-single", 4748368299), !0], null), b);
  return cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter));
    return cljs.core.truth_(b) ? cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)), a) : b;
  }()) ? lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "select!", "select!", 2992004631)) : cljs.core.empty_QMARK_.call(null, c) && cljs.core.not.call(null, (new cljs.core.Keyword(null, "force?", "force?", 4040082982)).cljs$core$IFn$_invoke$arity$1(d)) ? lt.objs.keyboard.passthrough.call(null) : cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))) ? 
  (lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274)), lt.plugins.auto_complete.start_hinting.call(null, a)) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.plugins.auto_complete.start_hinting.call(null, a, d) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "show-hint", "lt.plugins.auto-complete/show-hint", 2503474276), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__show_hint, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint", "hint", 1017106937), null], null), null));
lt.plugins.auto_complete.__BEH__remove_on_scroll_inactive = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))) ? lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "remove-on-scroll-inactive", "lt.plugins.auto-complete/remove-on-scroll-inactive", 1443432557), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__remove_on_scroll_inactive, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "inactive", "inactive", 
1038569437), null, new cljs.core.Keyword(null, "scroll", "scroll", 4401191487), null], null), null));
lt.plugins.auto_complete.__BEH__remove_on_move_line = function(a, b) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))) ? lt.util.js.wait.call(null, 0, function() {
    var b = (new cljs.core.Keyword(null, "starting-token", "starting-token", 3199431070)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)), d = (new cljs.core.Keyword(null, "token", "token", 1124445547)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)), e = lt.objs.editor.__GT_cursor.call(null, a);
    return cljs.core.truth_(cljs.core.truth_(b) ? cljs.core.truth_(d) ? !((new cljs.core.Keyword(null, "start", "start", 1123661780)).cljs$core$IFn$_invoke$arity$1(d) <= (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(e) && (new cljs.core.Keyword(null, "ch", "ch", 1013907415)).cljs$core$IFn$_invoke$arity$1(e) <= (new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(d)) || cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, 
    "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(e)) : d : b) ? lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274)) : null;
  }) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "remove-on-move-line", "lt.plugins.auto-complete/remove-on-move-line", 607886136), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__remove_on_move_line, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move", "move", 1017261891), null], null), 
null));
lt.plugins.auto_complete.__BEH__auto_show_on_input = function(a, b, c) {
  return cljs.core.truth_(lt.plugins.auto_complete.non_token_change_QMARK_.call(null, a, c)) ? null : cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter));
    return cljs.core.truth_(b) ? cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter)), a) : b;
  }()) ? null : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "hint", "hint", 1017106937), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select-single", "select-single", 4748368299), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "auto-show-on-input", "lt.plugins.auto-complete/auto-show-on-input", 2908044373), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__auto_show_on_input, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Auto-complete: Show on change", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "input", "input", 1114262332), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "auto-complete.remove", "auto-complete.remove", 4068728365), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Auto complete hide", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  cljs.core.truth_((new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.plugins.auto_complete.hinter))) && lt.object.raise.call(null, lt.plugins.auto_complete.hinter, new cljs.core.Keyword(null, "escape!", "escape!", 3844244274));
  return lt.objs.keyboard.passthrough.call(null);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "auto-complete", "auto-complete", 1879752457), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Auto complete", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.not.call(null, lt.objs.editor.selection_QMARK_.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "hint", "hint", 1017106937)) : lt.objs.keyboard.passthrough.call(null);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "auto-complete.force", "auto-complete.force", 686025030), new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Force auto complete", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "hint", "hint", 1017106937), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "force?", "force?", 4040082982), !0], null));
}], null));
lt.plugins.auto_complete.__BEH__init = function(a) {
  lt.util.load.js.call(null, "core/node_modules/codemirror_addons/show-hint.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  CodeMirror.extendMode("clojure", cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644), /[\w\-\>\:\*\$\?\<\!\+\.\\/foo]/], null)));
  CodeMirror.extendMode("text/x-clojurescript", cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644), /[\w\-\>\:\*\$\?\<\!\+\.\\/foo]/], null)));
  return CodeMirror.extendMode("css", cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644), /[\w\.\-\#]/], null)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.auto-complete", "init", "lt.plugins.auto-complete/init", 3795201691), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.auto_complete.__BEH__init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.plugins.doc = {};
lt.plugins.doc.doc_on_line_QMARK_ = function(a, b) {
  var c = lt.objs.editor.line_handle.call(null, a, b);
  return cljs.core.get_in.call(null, cljs.core.deref.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null)], null));
};
lt.plugins.doc.remove_BANG_ = function(a, b) {
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.dissoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null));
  return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
};
lt.plugins.doc.__BEH__clear = function(a) {
  return lt.object.update_BANG_.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.dissoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [(new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a)), new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "clear", "lt.plugins.doc/clear", 2712503260), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__clear, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear", "clear", 1108650431), null], null), null));
lt.plugins.doc.inline_doc = function(a, b, c, d) {
  var e = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), f = new cljs.core.Keyword(null, "underline", "underline", 4281907774), e = lt.objs.editor.line_handle.call(null, e, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(d));
  b = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "underline-result", "lt.objs.eval/underline-result", 1485297066), new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "class", "class", 1108647146), cljs.core.name.call(null, f), new cljs.core.Keyword(null, "opts", "opts", 1017322386), c, new cljs.core.Keyword(null, "result", "result", 4374444943), b, new cljs.core.Keyword(null, "loc", "loc", 1014011570), 
  d, new cljs.core.Keyword(null, "line", "line", 1017226086), e], null));
  lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "inline.doc", "inline.doc", 1790840789)], null));
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.assoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, new cljs.core.Keyword(null, "underline", "underline", 4281907774)], null), b);
  return b;
};
lt.plugins.doc.__BEH__doc_menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Toggle docs", new cljs.core.Keyword(null, "order", "order", 1119910592), 0.1, new cljs.core.Keyword(null, "enabled", "enabled", 3699277491), cljs.core.not.call(null, lt.objs.editor.selection_QMARK_.call(null, a)), new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "editor.doc.toggle", "editor.doc.toggle", 687720285));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator", new cljs.core.Keyword(null, "order", "order", 1119910592), 0.2], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "doc-menu+", "lt.plugins.doc/doc-menu+", 4142609518), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__doc_menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.doc.toggle", "editor.doc.toggle", 687720285), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Docs: Toggle documentation at cursor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    var b = lt.objs.editor.__GT_cursor.call(null, a), b = lt.plugins.doc.doc_on_line_QMARK_.call(null, a, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b));
    return cljs.core.truth_(b) ? lt.plugins.doc.remove_BANG_.call(null, a, b) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "editor.doc", "editor.doc", 3751347369));
  }
  return null;
}], null));
lt.plugins.doc.doc_ui = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.inline-doc", "div.inline-doc", 3323486451), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h1", "h1", 1013907515), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "ns", "ns", 1013907767)).cljs$core$IFn$_invoke$arity$1(a)], null), cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(a);
    return cljs.core.truth_(b) ? cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(a), "nil") : b;
  }()) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h3", "h3", 1013907517), (new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(a)], null) : null, cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a);
    return cljs.core.truth_(b) ? cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a), "nil") : b;
  }()) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a)], null) : null], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.plugins.doc.__BEH__editor__DOT__doc__DOT__show_BANG_ = function(a, b) {
  return cljs.core.not_EQ_.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b), "") ? lt.plugins.doc.inline_doc.call(null, a, lt.plugins.doc.doc_ui.call(null, b), cljs.core.PersistentArrayMap.EMPTY, (new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "editor.doc.show!", "lt.plugins.doc/editor.doc.show!", 2617163484), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__editor__DOT__doc__DOT__show_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.doc.show!", "editor.doc.show!", 1417900223), null], null), 
null));
lt.plugins.doc.search_item = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "h3", "h3", 1013907517), (new cljs.core.Keyword(null, "ns", "ns", 1013907767)).cljs$core$IFn$_invoke$arity$1(a)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 1014015509), "" + cljs.core.str((new cljs.core.Keyword(null, "args", "args", 1016906831)).cljs$core$IFn$_invoke$arity$1(a))], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre", "pre", 
  1014015509), (new cljs.core.Keyword(null, "doc", "doc", 1014003882)).cljs$core$IFn$_invoke$arity$1(a)], null)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.plugins.doc.search_input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.search", "input.search", 1599745982), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "search docs"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 
  4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "sidebar.doc.search.input", "sidebar.doc.search.input", 4629011646), a);
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "sidebar.doc.search.input", "sidebar.doc.search.input", 4629011646));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.plugins.doc.type_item = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(b)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set-item!", "set-item!", 4800272821), b);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.plugins.doc.type_list = function(a) {
  for (var b = crate.core.html.call(null, function() {
    var b = lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "types+", "types+", 4450069060), cljs.core.PersistentVector.EMPTY), c;
    c = (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    c = cljs.core.truth_(c) ? c : cljs.core.first.call(null, b);
    return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.types", "div.types", 2042580046), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(c)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
    "ul.types", "ul.types", 1553185236), cljs.core.map.call(null, cljs.core.partial.call(null, lt.plugins.doc.type_item, a), b)], null)], null);
  }()), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.plugins.doc.connect_button = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), "Connect"], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "show-add-connection", "show-add-connection", 3671605196));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.plugins.doc.no_client_ui = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.no-client", "div.no-client", 3517747116), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "There's no client for us to use to search for these kinds of docs. "], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "p", "p", 1013904354), lt.plugins.doc.connect_button.call(null), " to one."], null)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.plugins.doc.try_trigger = function(a, b, c) {
  var d = lt.objs.clients.discover_STAR_.call(null, (new cljs.core.Keyword(null, "trigger", "trigger", 4248979754)).cljs$core$IFn$_invoke$arity$1(b));
  if (cljs.core.not.call(null, cljs.core.seq.call(null, d))) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "no-client", "no-client", 4161042633));
  }
  var e = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".no-client", ".no-client", 3711355995), lt.object.__GT_content.call(null, a));
  cljs.core.truth_(e) && lt.util.dom.remove.call(null, e);
  lt.objs.notifos.set_msg_BANG_.call(null, "Searching for docs...");
  for (var d = cljs.core.seq.call(null, d), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g);
      lt.objs.notifos.working.call(null);
      lt.objs.clients.send.call(null, h, (new cljs.core.Keyword(null, "trigger", "trigger", 4248979754)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "search", "search", 4402534682), c], null), new cljs.core.Keyword(null, "only", "only", 1017320222), a);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        e = d, cljs.core.chunked_seq_QMARK_.call(null, e) ? (d = cljs.core.chunk_first.call(null, e), f = cljs.core.chunk_rest.call(null, e), e = d, h = cljs.core.count.call(null, d), d = f, f = h) : (h = cljs.core.first.call(null, e), lt.objs.notifos.working.call(null), lt.objs.clients.send.call(null, h, (new cljs.core.Keyword(null, "trigger", "trigger", 4248979754)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "search", "search", 4402534682), 
        c], null), new cljs.core.Keyword(null, "only", "only", 1017320222), a), d = cljs.core.next.call(null, e), e = null, f = 0), g = 0;
      } else {
        return null;
      }
    }
  }
};
lt.plugins.doc.__GT_val = function(a) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a)));
};
lt.plugins.doc.grouped_items = function(a, b, c) {
  var d = lt.util.dom.fragment.call(null, cljs.core.PersistentVector.EMPTY), e = lt.util.dom.fragment.call(null, cljs.core.PersistentVector.EMPTY);
  a = cljs.core.seq.call(null, a);
  for (var f = null, g = 0, h = 0;;) {
    if (h < g) {
      var k = cljs.core._nth.call(null, f, h);
      cljs.core.not.call(null, c.call(null, k)) && (lt.util.cljs.str_contains_QMARK_.call(null, "" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(k)), b) ? lt.util.dom.append.call(null, e, lt.plugins.doc.search_item.call(null, k)) : lt.util.dom.append.call(null, d, lt.plugins.doc.search_item.call(null, k)));
      h += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        f = a, cljs.core.chunked_seq_QMARK_.call(null, f) ? (a = cljs.core.chunk_first.call(null, f), h = cljs.core.chunk_rest.call(null, f), f = a, g = cljs.core.count.call(null, a), a = h) : (a = cljs.core.first.call(null, f), cljs.core.not.call(null, c.call(null, a)) && (lt.util.cljs.str_contains_QMARK_.call(null, "" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), b) ? lt.util.dom.append.call(null, e, lt.plugins.doc.search_item.call(null, 
        a)) : lt.util.dom.append.call(null, d, lt.plugins.doc.search_item.call(null, a))), a = cljs.core.next.call(null, f), f = null, g = 0), h = 0;
      } else {
        break;
      }
    }
  }
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "normal", "normal", 4269125721), d, new cljs.core.Keyword(null, "exact", "exact", 1110851185), e], null);
};
lt.plugins.doc.__BEH__set_item = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cur", "cur", 1014003122), b], null));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  lt.util.dom.replace_with.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".types", ".types", 2441689213), lt.object.__GT_content.call(null, a)), lt.plugins.doc.type_list.call(null, a));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "set-item", "lt.plugins.doc/set-item", 1434521397), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__set_item, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set-item!", "set-item!", 4800272821), null], null), null));
lt.plugins.doc.__BEH__clear_BANG_ = function(a) {
  lt.util.dom.empty.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".results", ".results", 676347770), lt.object.__GT_content.call(null, a)));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "results", "results", 2111450984), cljs.core.PersistentHashSet.EMPTY], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "clear!", "lt.plugins.doc/clear!", 4445595907), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.plugins.doc.__BEH__no_client = function(a) {
  return cljs.core.truth_(lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".no-client", ".no-client", 3711355995), lt.object.__GT_content.call(null, a))) ? null : lt.util.dom.before.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".results", ".results", 676347770), lt.object.__GT_content.call(null, a)), lt.plugins.doc.no_client_ui.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "no-client", "lt.plugins.doc/no-client", 4152219374), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__no_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "no-client", "no-client", 4161042633), null], null), null));
lt.plugins.doc.__BEH__cur_from_last_editor = function(a) {
  var b = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(b)) {
    var c = (new cljs.core.Keyword(null, "type-name", "type-name", 1486910640)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
    if (cljs.core.truth_(cljs.core.get.call(null, (new cljs.core.Keyword(null, "file-types", "file-types", 1727875162)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c))) {
      return null;
    }
    b = cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
      return cljs.core.get.call(null, (new cljs.core.Keyword(null, "file-types", "file-types", 1727875162)).cljs$core$IFn$_invoke$arity$1(a), c);
    }, lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "types+", "types+", 4450069060), cljs.core.PersistentVector.EMPTY)));
    return cljs.core.truth_(b) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "set-item!", "set-item!", 4800272821), b) : null;
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "cur-from-last-editor", "lt.plugins.doc/cur-from-last-editor", 2473070949), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__cur_from_last_editor, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.plugins.doc.__BEH__sidebar__DOT__doc__DOT__search__DOT__exec = function(a) {
  var b = lt.plugins.doc.__GT_val.call(null, a), c = (new cljs.core.Keyword(null, "trigger", "trigger", 4248979754)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  return cljs.core.empty_QMARK_.call(null, b) ? null : cljs.core.fn_QMARK_.call(null, c) ? c.call(null, b) : lt.plugins.doc.try_trigger.call(null, a, (new cljs.core.Keyword(null, "cur", "cur", 1014003122)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "sidebar.doc.search.exec", "lt.plugins.doc/sidebar.doc.search.exec", 3098799462), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__sidebar__DOT__doc__DOT__search__DOT__exec, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar.doc.search.exec", "sidebar.doc.search.exec", 
991863361), null], null), null));
lt.plugins.doc.__BEH__doc__DOT__search__DOT__results = function(a, b) {
  var c = lt.plugins.doc.__GT_val.call(null, a), c = lt.plugins.doc.grouped_items.call(null, b, c, (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), d = cljs.core.seq_QMARK_.call(null, c) ? cljs.core.apply.call(null, cljs.core.hash_map, c) : c, c = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "exact", "exact", 1110851185)), d = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "normal", "normal", 4269125721)), 
  e = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".results", ".results", 676347770), lt.object.__GT_content.call(null, a));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "results", "results", 2111450984), cljs.core.into.call(null, (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b)], null));
  lt.objs.notifos.done_working.call(null, [cljs.core.str("Found "), cljs.core.str(cljs.core.count.call(null, (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), cljs.core.str(" doc results.")].join(""));
  lt.util.dom.prepend.call(null, e, c);
  return lt.util.dom.append.call(null, e, d);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "doc.search.results", "lt.plugins.doc/doc.search.results", 672290493), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__doc__DOT__search__DOT__results, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "doc.search.results", "doc.search.results", 3363305624), null], 
null), null));
lt.plugins.doc.__BEH__focus_BANG_ = function(a) {
  return lt.util.dom.focus.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "focus!", "lt.plugins.doc/focus!", 4022473696), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "sidebar.doc.search", "lt.plugins.doc/sidebar.doc.search", 2177966983), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar.docs.search", "sidebar.docs.search", 3039267995), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "Doc search", new cljs.core.Keyword(null, "init", 
"init", 1017141378), function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cur", "cur", 1014003122), cljs.core.first.call(null, lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "types+", "types+", 4450069060), cljs.core.PersistentVector.EMPTY))], null));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.docs-search.filter-list", "div.docs-search.filter-list", 4304685172), lt.plugins.doc.search_input.call(null, a), lt.plugins.doc.type_list.call(null, a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.results", "ul.results", 1522517777)], null)], null);
});
lt.plugins.doc.doc_search = null;
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "docs.search.exec", "docs.search.exec", 4500234582), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Docs: Execute sidebar search", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return cljs.core.truth_(lt.plugins.doc.doc_search) ? lt.object.raise.call(null, lt.plugins.doc.doc_search, new cljs.core.Keyword(null, "sidebar.doc.search.exec", "sidebar.doc.search.exec", 991863361)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "docs.search.show", "docs.search.show", 4500636610), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Docs: Search language docs", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return cljs.core.truth_(lt.plugins.doc.doc_search) ? (lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.plugins.doc.doc_search, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "force?", "force?", 4040082982), a], null)), lt.object.raise.call(null, lt.plugins.doc.doc_search, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819))) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "docs.search.hide", "docs.search.hide", 4500309511), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Docs: hide language docs", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return cljs.core.truth_(lt.plugins.doc.doc_search) ? lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "close!", "close!", 3951350939), lt.plugins.doc.doc_search) : null;
}], null));
lt.plugins.doc.__BEH__init_doc_search = function(a) {
  lt.plugins.doc.doc_search = lt.object.create.call(null, new cljs.core.Keyword("lt.plugins.doc", "sidebar.doc.search", "lt.plugins.doc/sidebar.doc.search", 2177966983));
  return lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.rightbar, lt.plugins.doc.doc_search);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.doc", "init-doc-search", "lt.plugins.doc/init-doc-search", 1501856585), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.doc.__BEH__init_doc_search, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.find = {};
lt.objs.find.find_height = 30;
lt.objs.find.input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.find", "input.find", 2354911439), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "find"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 
  5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 1114262332), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "search!", "search!", 2982232811), lt.util.dom.val.call(null, this));
  }, new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "find-bar", "find-bar", 4628501873), a);
    return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "find-bar", "find-bar", 4628501873));
    return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.find.replace_input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.replace", "input.replace", 1121297410), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "replace"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 
  6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 1114262332), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "replace.changed", "replace.changed", 762914028), lt.util.dom.val.call(null, this));
  }, new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "find-bar.replace", "find-bar.replace", 4492994871), a);
    return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "find-bar.replace", "find-bar.replace", 4492994871));
    return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.find.replace_all_button = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), "all"], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "find.replace-all", "find.replace-all", 2877618629));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.find.current_ed = function() {
  return lt.objs.editor.__GT_cm_ed.call(null, lt.objs.editor.pool.last_active.call(null));
};
lt.objs.find.__GT_shown_width = function(a) {
  return cljs.core.truth_(a) ? "" : "0";
};
lt.objs.find.__GT_val = function(a) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input.find", "input.find", 2354911439), lt.object.__GT_content.call(null, a)));
};
lt.objs.find.__GT_replacement = function(a) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input.replace", "input.replace", 1121297410), lt.object.__GT_content.call(null, a)));
};
lt.objs.find.set_val = function(a, b) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input.find", "input.find", 2354911439), lt.object.__GT_content.call(null, a)), b);
};
lt.objs.find.__BEH__show_BANG_ = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "pos", "pos", 1014015430), function() {
    var a = lt.objs.editor.pool.last_active.call(null);
    return cljs.core.truth_(a) ? lt.objs.editor.__GT_cursor.call(null, a) : null;
  }()], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "show!", "lt.objs.find/show!", 2146764764), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__show_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show!", "show!", 1123317814), null], null), null));
lt.objs.find.__BEH__hide_BANG_ = function(a) {
  a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.objs.editor.focus.call(null, a) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "hide!", "lt.objs.find/hide!", 2156838397), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__hide_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hide!", "hide!", 1113177745), null], null), null));
lt.objs.find.__BEH__next_BANG_ = function(a) {
  var b = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(b) ? cljs.core.truth_(function() {
    var c = (new cljs.core.Keyword(null, "searching?", "searching?", 4599032247)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    return cljs.core.truth_(c) ? cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "searching.for", "searching.for", 2610146695)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), lt.objs.find.__GT_val.call(null, a)) : c;
  }()) ? CodeMirror.commands.findNext(lt.objs.find.current_ed.call(null), (new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "search!", "search!", 2982232811), lt.objs.find.__GT_val.call(null, a)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "next!", "lt.objs.find/next!", 2149177006), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__next_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "next!", "next!", 1118619392), null], null), null));
lt.objs.find.__BEH__prev_BANG_ = function(a) {
  var b = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(b) ? cljs.core.truth_(function() {
    var c = (new cljs.core.Keyword(null, "searching?", "searching?", 4599032247)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    return cljs.core.truth_(c) ? cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "searching.for", "searching.for", 2610146695)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), lt.objs.find.__GT_val.call(null, a)) : c;
  }()) ? CodeMirror.commands.findPrev(lt.objs.find.current_ed.call(null), (new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "search!", "search!", 2982232811), lt.objs.find.__GT_val.call(null, a)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "prev!", "lt.objs.find/prev!", 2146953582), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__prev_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "prev!", "prev!", 1120835520), null], null), null));
lt.objs.find.__BEH__focus_BANG_ = function(a) {
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  lt.util.dom.focus.call(null, a);
  return a.select();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "focus!", "lt.objs.find/focus!", 3523298151), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.find.__BEH__clear_BANG_ = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "searching?", "searching?", 4599032247), !1], null));
  var b = lt.objs.editor.pool.last_active.call(null);
  cljs.core.truth_(b) && CodeMirror.commands.clearSearch(lt.objs.editor.__GT_cm_ed.call(null, b));
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  return cljs.core._EQ_.call(null, "", lt.util.dom.val.call(null, a)) ? lt.util.dom.val.call(null, a, "") : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "clear!", "lt.objs.find/clear!", 2808649292), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.find.__BEH__replace_BANG_ = function(a, b) {
  cljs.core.truth_((new cljs.core.Keyword(null, "searching?", "searching?", 4599032247)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) || lt.object.raise.call(null, a, new cljs.core.Keyword(null, "search!", "search!", 2982232811), lt.objs.find.__GT_val.call(null, a));
  CodeMirror.commands.replace(lt.objs.editor.__GT_cm_ed.call(null, lt.objs.editor.pool.last_active.call(null)), lt.objs.find.__GT_replacement.call(null, a), (new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), cljs.core.boolean$.call(null, b));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "next!", "next!", 1118619392));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "replace!", "lt.objs.find/replace!", 1610475715), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__replace_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "replace!", "replace!", 583571295), null], null), null));
lt.objs.find.__BEH__search_BANG_ = function(a, b) {
  if (cljs.core.empty_QMARK_.call(null, b)) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  }
  var c = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(c)) {
    var d = (new cljs.core.Keyword(null, "pos", "pos", 1014015430)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    cljs.core.truth_(d) && lt.objs.editor.move_cursor.call(null, c, d);
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "searching?", "searching?", 4599032247), !0], null));
    lt.object.merge_BANG_.call(null, c, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "searching.for", "searching.for", 2610146695), b], null));
    c = lt.objs.editor.__GT_cm_ed.call(null, c);
    return CodeMirror.commands.find(c, b, (new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "search!", "lt.objs.find/search!", 4580588119), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__search_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "search!", "search!", 2982232811), null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 
1556599227), 50);
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "find-bar", "lt.objs.find/find-bar", 1860577053), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "find-bar", "find-bar", 4628501873), null], null), null), new cljs.core.Keyword(null, "height", "height", 4087841945), 30, new cljs.core.Keyword(null, "order", "order", 1119910592), -1, new cljs.core.Keyword(null, 
"searching?", "searching?", 4599032247), !1, new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407), !1, new cljs.core.Keyword(null, "shown", "shown", 1123317891), !1, new cljs.core.Keyword(null, "pos", "pos", 1014015430), null, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#find-bar", "div#find-bar", 4400386339), lt.objs.find.input.call(null, a), lt.objs.find.replace_input.call(null, a), lt.objs.find.replace_all_button.call(null, a)], null);
});
lt.objs.find.__BEH__init = function(a) {
  lt.util.load.js.call(null, "core/node_modules/codemirror_addons/search.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
  return lt.util.load.js.call(null, "core/node_modules/codemirror/addon/search/searchcursor.js", new cljs.core.Keyword(null, "sync", "sync", 1017449997));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "init", "lt.objs.find/init", 2521376816), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.find.bar = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.find", "find-bar", "lt.objs.find/find-bar", 1860577053));
lt.objs.statusbar.add_container.call(null, lt.objs.find.bar);
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.show", "find.show", 1398717828), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: In current editor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  lt.object.merge_BANG_.call(null, lt.objs.find.bar, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "reverse?", "reverse?", 749403407), a], null));
  lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "show!", "show!", 1123317814));
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.fill-selection", "find.fill-selection", 632770057), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Fill with selection", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? (a = lt.objs.editor.selection.call(null, a), cljs.core.truth_(a) ? cljs.core.empty_QMARK_.call(null, a) ? null : lt.objs.find.set_val.call(null, lt.objs.find.bar, a) : null) : null;
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.clear", "find.clear", 4338523466), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Clear the find bar", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.hide", "find.hide", 1398390729), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Hide the find bar", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "hide!", "hide!", 1113177745));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.next", "find.next", 1398566266), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Next find result", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "next!", "next!", 1118619392));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.prev", "find.prev", 1398637754), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Previous find result", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "prev!", "prev!", 1120835520));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.replace", "find.replace", 755032817), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Replace current", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "replace!", "replace!", 583571295));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "find.replace-all", "find.replace-all", 2877618629), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Find: Replace all occurrences", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.find.bar, new cljs.core.Keyword(null, "replace!", "replace!", 583571295), new cljs.core.Keyword(null, "all", "all", 1014000915));
}], null));
lt.objs.find.line_input = lt.objs.sidebar.command.options_input.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "line number"], null));
lt.objs.find.__BEH__exec_active_BANG_ = function(a, b) {
  return lt.objs.sidebar.command.exec_active_BANG_.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.find", "exec-active!", "lt.objs.find/exec-active!", 4519874941), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.find.__BEH__exec_active_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.object.add_behavior_BANG_.call(null, lt.objs.find.line_input, new cljs.core.Keyword("lt.objs.find", "exec-active!", "lt.objs.find/exec-active!", 4519874941));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "goto-line", "goto-line", 2802035088), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Goto line", new cljs.core.Keyword(null, "options", "options", 4059396624), lt.objs.find.line_input, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  if ("number" !== typeof a && cljs.core.empty_QMARK_.call(null, a)) {
    return null;
  }
  var b = lt.objs.editor.pool.last_active.call(null);
  lt.objs.editor.move_cursor.call(null, b, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "ch", "ch", 1013907415), 0, new cljs.core.Keyword(null, "line", "line", 1017226086), ("number" !== typeof a ? parseInt(a) : a) - 1], null));
  return lt.objs.editor.center_cursor.call(null, b);
}], null));
lt.objs.docs = {};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "show-docs", "show-docs", 3358896765), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Docs: Open Light Table's documentation", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910), "http://docs.lighttable.com/");
}], null));
lt.plugins.watches = {};
lt.plugins.watches.inline = function(a, b, c) {
  var d = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), e = function() {
    var a = (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(b);
    return cljs.core.truth_(a) ? a : new cljs.core.Keyword(null, "inline", "inline", 4124874251);
  }(), d = lt.objs.editor.line_handle.call(null, d, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c));
  c = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-result", "lt.objs.eval/inline-result", 1807255869), new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), a, new cljs.core.Keyword(null, "class", "class", 1108647146), function() {
    var a = (new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(b);
    return cljs.core.truth_(a) ? a : cljs.core.name.call(null, e);
  }(), new cljs.core.Keyword(null, "opts", "opts", 1017322386), b, new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, new cljs.core.Keyword(null, "line", "line", 1017226086), d], null));
  lt.object.add_tags.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "inline.watch", "inline.watch", 4637733036)], null));
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "widgets", "widgets", 2354242081)], null), cljs.core.assoc, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d, e], null), c);
  return c;
};
lt.plugins.watches.watched_range = function(a, b, c, d) {
  var e = CodeMirror.Doc(lt.objs.editor.__GT_val.call(null, a)), f = cljs.core.truth_(b) ? lt.objs.editor.mark.call(null, e, b, cljs.core.update_in.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ch", "ch", 1013907415)], null), cljs.core.inc), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "inclusiveLeft", "inclusiveLeft", 4040813445), !0, new cljs.core.Keyword(null, "inclusiveRight", "inclusiveRight", 
  4659437314), !0], null)) : null;
  b = cljs.core.doall.call(null, cljs.core.filter.call(null, cljs.core.identity, function() {
    return function(a, b) {
      return function r(c) {
        return new cljs.core.LazySeq(null, function(a, b) {
          return function() {
            for (;;) {
              var b = cljs.core.seq.call(null, c);
              if (b) {
                if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
                  var d = cljs.core.chunk_first.call(null, b), e = cljs.core.count.call(null, d), f = cljs.core.chunk_buffer.call(null, e);
                  return function() {
                    for (var b = 0;;) {
                      if (b < e) {
                        var c = cljs.core._nth.call(null, d, b), g = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nth.call(null, c, 1, null), h = (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(c), c = h.find(), k = cljs.core.truth_(c) ? lt.objs.editor.mark.call(null, a, c.from, c.to, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "className", "className", 1004015509), "watched"], null)) : null;
                        cljs.core.chunk_append.call(null, f, cljs.core.truth_(k) ? function() {
                          k.custom = h.custom;
                          k.ltwatchid = g;
                          return k;
                        }() : null);
                        b += 1;
                      } else {
                        return!0;
                      }
                    }
                  }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), r.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), null);
                }
                var g = cljs.core.first.call(null, b), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null), k = (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(g), g = k.find(), l = cljs.core.truth_(g) ? lt.objs.editor.mark.call(null, a, g.from, g.to, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "className", "className", 1004015509), "watched"], null)) : null;
                return cljs.core.cons.call(null, cljs.core.truth_(l) ? function() {
                  l.custom = k.custom;
                  l.ltwatchid = h;
                  return l;
                }() : null, r.call(null, cljs.core.rest.call(null, b)));
              }
              return null;
            }
          };
        }(a, b), null, null);
      };
    }(e, f).call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  }()));
  b = cljs.core.seq.call(null, b);
  c = null;
  for (var g = d = 0;;) {
    if (g < d) {
      var h = cljs.core._nth.call(null, c, g), k = h.find(), l = lt.objs.editor.range.call(null, e, k.from, k.to), m = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "obj", "obj", 1014014057), lt.object.__GT_id.call(null, a), new cljs.core.Keyword(null, "id", "id", 1013907597), h.ltwatchid], null), h = cljs.core.not.call(null, h.custom) ? lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "watch.src+", "watch.src+", 868749304), l, m, l) : lt.object.raise_reduce.call(null, 
      a, new cljs.core.Keyword(null, "watch.custom.src+", "watch.custom.src+", 509336567), l, m, h.custom, l);
      lt.objs.editor.replace.call(null, e, k.from, k.to, h);
      g += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = d.find(), g = lt.objs.editor.range.call(null, e, c.from, c.to), k = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "obj", "obj", 1014014057), lt.object.__GT_id.call(null, a), new cljs.core.Keyword(null, "id", "id", 1013907597), d.ltwatchid], null), d = cljs.core.not.call(null, 
        d.custom) ? lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "watch.src+", "watch.src+", 868749304), g, k, g) : lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "watch.custom.src+", "watch.custom.src+", 509336567), g, k, d.custom, g), lt.objs.editor.replace.call(null, e, c.from, c.to, d), b = cljs.core.next.call(null, b), c = null, d = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.truth_(f) ? (b = f.find(), lt.objs.editor.range.call(null, e, b.from, b.to)) : lt.objs.editor.__GT_val.call(null, e);
};
lt.plugins.watches.__BEH__clear_BANG_ = function(a) {
  var b = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  a = (new cljs.core.Keyword(null, "id", "id", 1013907597)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "opts", "opts", 1017322386)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), a)).clear();
  lt.object.update_BANG_.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "watches", "watches", 2139868463)], null), cljs.core.dissoc, a);
  return lt.object.raise.call(null, b, new cljs.core.Keyword(null, "unwatch", "unwatch", 739762504));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.watches", "clear!", "lt.plugins.watches/clear!", 3654100319), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.watches.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear", "clear", 1108650431), null], null), null));
lt.plugins.watches.__BEH__watch_BANG_ = function(a, b) {
  var c = lt.objs.editor.selection_bounds.call(null, a);
  if (cljs.core.truth_(c)) {
    var d = "" + cljs.core.str(cljs.core.gensym.call(null, "watch")), e = lt.objs.editor.mark.call(null, a, (new cljs.core.Keyword(null, "from", "from", 1017056028)).cljs$core$IFn$_invoke$arity$1(c), (new cljs.core.Keyword(null, "to", "to", 1013907949)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "className", "className", 1004015509), function() {
      var a = (new cljs.core.Keyword(null, "class", "class", 1108647146)).cljs$core$IFn$_invoke$arity$1(b);
      return cljs.core.truth_(a) ? a : "watched";
    }(), new cljs.core.Keyword(null, "inclusiveLeft", "inclusiveLeft", 4040813445), !1, new cljs.core.Keyword(null, "inclusiveRight", "inclusiveRight", 4659437314), !1], null)), f = lt.plugins.watches.inline.call(null, a, cljs.core.merge.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "watch", "watch", 1126807617), new cljs.core.Keyword(null, "id", "id", 1013907597), d], null), b), (new cljs.core.Keyword(null, 
    "to", "to", 1013907949)).cljs$core$IFn$_invoke$arity$1(c));
    e.on("hide", function() {
      return lt.object.raise.call(null, f, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
    });
    e.custom = cljs.core.truth_((new cljs.core.Keyword(null, "exp", "exp", 1014005135)).cljs$core$IFn$_invoke$arity$1(b)) ? b : null;
    e.lttype = new cljs.core.Keyword(null, "watch", "watch", 1126807617);
    e.ltwatchid = d;
    lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "watches", "watches", 2139868463)], null), cljs.core.assoc, d, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "mark", "mark", 1017248319), e, new cljs.core.Keyword(null, "inline-result", "inline-result", 656479555), f], null));
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "watch", "watch", 1126807617));
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.watches", "watch!", "lt.plugins.watches/watch!", 2067324701), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.watches.__BEH__watch_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watch!", "watch!", 4513908900), null], null), null));
lt.plugins.watches.__BEH__unwatch_BANG_ = function(a) {
  var b = lt.objs.editor.__GT_cursor.call(null, a);
  if (cljs.core.truth_(b)) {
    for (var b = cljs.core.seq.call(null, lt.objs.editor.find_marks.call(null, a, b)), c = null, d = 0, e = 0;;) {
      if (e < d) {
        var f = cljs.core._nth.call(null, c, e);
        cljs.core._EQ_.call(null, f.lttype, new cljs.core.Keyword(null, "watch", "watch", 1126807617)) && lt.object.raise.call(null, (new cljs.core.Keyword(null, "inline-result", "inline-result", 656479555)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), f.ltwatchid)), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
        e += 1;
      } else {
        if (b = cljs.core.seq.call(null, b)) {
          c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), d = cljs.core.chunk_rest.call(null, c), c = b, f = cljs.core.count.call(null, b), b = d, d = f) : (f = cljs.core.first.call(null, c), cljs.core._EQ_.call(null, f.lttype, new cljs.core.Keyword(null, "watch", "watch", 1126807617)) && lt.object.raise.call(null, (new cljs.core.Keyword(null, "inline-result", "inline-result", 656479555)).cljs$core$IFn$_invoke$arity$1(cljs.core.get.call(null, (new cljs.core.Keyword(null, 
          "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), f.ltwatchid)), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
        } else {
          return null;
        }
      }
    }
  } else {
    return null;
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.watches", "unwatch!", "lt.plugins.watches/unwatch!", 548267784), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.watches.__BEH__unwatch_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "unwatch!", "unwatch!", 1105444989), null], null), null));
lt.plugins.watches.__BEH__eval_on_watch_or_unwatch = function(a) {
  if (cljs.core.truth_(lt.objs.editor.selection_QMARK_.call(null, a))) {
    var b = lt.objs.editor.__GT_cursor.call(null, a);
    lt.objs.editor.set_selection.call(null, a, b, b);
  }
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "eval.one", "eval.one", 1173589382));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.plugins.watches", "eval-on-watch-or-unwatch", "lt.plugins.watches/eval-on-watch-or-unwatch", 4451254564), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.plugins.watches.__BEH__eval_on_watch_or_unwatch, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "unwatch", "unwatch", 739762504), null, new cljs.core.Keyword(null, 
"watch", "watch", 1126807617), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.watch.watch-selection", "editor.watch.watch-selection", 1447617696), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Watch selection", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "watch!", "watch!", 4513908900)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.watch.custom-watch-selection", "editor.watch.custom-watch-selection", 3503983620), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Custom watch selection", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a, b) {
  var c = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(c) ? lt.object.raise.call(null, c, new cljs.core.Keyword(null, "watch!", "watch!", 4513908900), cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "exp", "exp", 1014005135), a)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.watch.unwatch", "editor.watch.unwatch", 4724838504), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Remove watch under cursor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "unwatch!", "unwatch!", 1105444989)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.watch.remove-all", "editor.watch.remove-all", 4319393066), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Clear all watches", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a)) {
    for (var a = cljs.core.seq.call(null, cljs.core.vals.call(null, (new cljs.core.Keyword(null, "watches", "watches", 2139868463)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), b = null, c = 0, d = 0;;) {
      if (d < c) {
        var e = cljs.core._nth.call(null, b, d);
        lt.object.raise.call(null, (new cljs.core.Keyword(null, "inline-result", "inline-result", 656479555)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
        d += 1;
      } else {
        if (a = cljs.core.seq.call(null, a)) {
          b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.object.raise.call(null, (new cljs.core.Keyword(null, "inline-result", "inline-result", 656479555)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
        } else {
          return null;
        }
      }
    }
  } else {
    return null;
  }
}], null));
lt.objs.dev = {};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "dev-inspector", "dev-inspector", 4263722673), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Dev: Open Developer Tools", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.util.ipc.send.call(null, "toggleDevTools", lt.objs.app.window_number.call(null));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "toggle-edge", "toggle-edge", 4616731656), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Toggle edge", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  if (cljs.core.truth_(lt.objs.cache.fetch.call(null, new cljs.core.Keyword(null, "edge", "edge", 1017012527)))) {
    return lt.objs.cache.store_BANG_.call(null, new cljs.core.Keyword(null, "edge", "edge", 1017012527), !1), lt.objs.notifos.set_msg_BANG_.call(null, "Tracking normal");
  }
  lt.objs.cache.store_BANG_.call(null, new cljs.core.Keyword(null, "edge", "edge", 1017012527), !0);
  return lt.objs.notifos.set_msg_BANG_.call(null, "Tracking edge");
}], null));
lt.objs.clients.tcp = {};
lt.objs.clients.tcp.port = 0;
lt.objs.clients.tcp.net = require("net");
lt.objs.clients.tcp.send_to = function(a, b) {
  return cljs.core.truth_(a) ? a.write([cljs.core.str(JSON.stringify(b)), cljs.core.str("\n")].join("")) : cljs.core.println.call(null, [cljs.core.str("No such client: "), cljs.core.str(a)].join(""));
};
lt.objs.clients.tcp.store_client_BANG_ = function(a, b) {
  var c = lt.objs.clients.by_name.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b)), d = cljs.core.not.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(b)) ? cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tcp.client", "tcp.client", 3877789162)], 
  null)) : cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "tags", "tags", 1017456523), cljs.core.map.call(null, cljs.core.keyword, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(b)));
  cljs.core.truth_(lt.objs.clients.available_QMARK_.call(null, c)) && lt.objs.clients.close_BANG_.call(null, c);
  a.on("close", function() {
    var b = lt.objs.clients.by_name.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(d));
    return cljs.core.truth_(b) ? cljs.core._EQ_.call(null, a, (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) ? lt.objs.clients.rem_BANG_.call(null, b) : null : null;
  });
  return lt.objs.clients.handle_connection_BANG_.call(null, cljs.core.assoc.call(null, d, new cljs.core.Keyword(null, "socket", "socket", 4411822821), a));
};
lt.objs.clients.tcp.on_message = function(a) {
  return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), a);
};
lt.objs.clients.tcp.each_message = function(a, b) {
  for (var c = a.ltbuffer, d = c.indexOf("\n"), e = c;;) {
    if (cljs.core.truth_(function() {
      var a = d;
      return cljs.core.truth_(a) ? -1 < d && !cljs.core.empty_QMARK_.call(null, e) : a;
    }())) {
      var f = cljs.core.subs.call(null, e, 0, d), c = cljs.core.subs.call(null, e, d + 1), g;
      try {
        g = cljs.core.js__GT_clj.call(null, JSON.parse(f), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
      } catch (h) {
        g = lt.objs.console.error.call(null, h);
      }
      b.call(null, g);
      d = f = c.indexOf("\n");
      e = c;
    } else {
      return a.ltbuffer = e;
    }
  }
};
lt.objs.clients.tcp.on_result = function(a, b) {
  a.ltbuffer = [cljs.core.str(function() {
    var b = a.ltbuffer;
    return cljs.core.truth_(b) ? b : "";
  }()), cljs.core.str(b)].join("");
  return lt.objs.clients.tcp.each_message.call(null, a, function(b) {
    return cljs.core.map_QMARK_.call(null, b) ? lt.objs.clients.tcp.store_client_BANG_.call(null, a, b) : lt.objs.clients.tcp.on_message.call(null, b);
  });
};
lt.objs.clients.tcp.on_connect = function(a) {
  a.ltbuffer = "";
  return a.on("data", function(b) {
    return lt.objs.clients.tcp.on_result.call(null, a, b);
  });
};
lt.objs.clients.tcp.server = function() {
  try {
    var a = lt.objs.clients.tcp.net.createServer(lt.objs.clients.tcp.on_connect);
    a.listen(0);
    a.on("listening", function() {
      return lt.objs.clients.tcp.port = a.address().port;
    });
    return a;
  } catch (b) {
    return lt.objs.console.error.call(null, "Error starting tcp server", b);
  }
}();
lt.objs.clients.tcp.__BEH__send_BANG_ = function(a, b) {
  return lt.objs.clients.tcp.send_to.call(null, (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), [(new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(b), cljs.core.clj__GT_js.call(null, (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b))]);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.tcp", "send!", "lt.objs.clients.tcp/send!", 2875144019), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.tcp.__BEH__send_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "send!", "send!", 1123226891), null], null), null));
lt.objs.clients.tcp.__BEH__kill_on_closed = function(a) {
  return lt.objs.clients.tcp.server.close();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.tcp", "kill-on-closed", "lt.objs.clients.tcp/kill-on-closed", 3457993505), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.tcp.__BEH__kill_on_closed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closed", "closed", 3951351006), null], null), null));
lt.objs.clients.ws = {};
lt.objs.clients.ws.port = 0;
lt.objs.clients.ws.sockets = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.clients.ws.io = lt.util.load.node_module.call(null, "socket.io");
lt.objs.clients.ws.net = require("net");
lt.objs.clients.ws.send_to = function(a, b) {
  return cljs.core.truth_(a) ? a.emit(cljs.core.second.call(null, b), b) : console.log([cljs.core.str("No such client: "), cljs.core.str(a)].join(""));
};
lt.objs.clients.ws.__GT_client = function(a) {
  a = cljs.core.js__GT_clj.call(null, a, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0);
  return cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "ws", "ws", 1013908046));
};
lt.objs.clients.ws.store_client_BANG_ = function(a, b) {
  var c = cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0), d = lt.objs.clients.by_name.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c)), e = cljs.core.not.call(null, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(c)) ? cljs.core.assoc.call(null, c, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ws.client", "ws.client", 4342632079)], null)) : cljs.core.assoc.call(null, c, new cljs.core.Keyword(null, "tags", "tags", 1017456523), cljs.core.map.call(null, cljs.core.keyword, (new cljs.core.Keyword(null, "tags", "tags", 1017456523)).cljs$core$IFn$_invoke$arity$1(c)));
  a.on("disconnect", function() {
    var b = lt.objs.clients.by_name.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(e));
    return cljs.core.truth_(b) ? cljs.core._EQ_.call(null, a, (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) ? lt.objs.clients.rem_BANG_.call(null, b) : null : null;
  });
  return cljs.core.truth_(lt.objs.clients.available_QMARK_.call(null, d)) ? lt.object.merge_BANG_.call(null, d, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "socket", "socket", 4411822821), a], null)) : lt.objs.clients.handle_connection_BANG_.call(null, cljs.core.assoc.call(null, e, new cljs.core.Keyword(null, "socket", "socket", 4411822821), a, new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "websocket", "websocket", 784338745)));
};
lt.objs.clients.ws.on_result = function(a, b) {
  return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0));
};
lt.objs.clients.ws.on_connect = function(a) {
  a.on("result", function(b) {
    return lt.objs.clients.ws.on_result.call(null, a, b);
  });
  return a.on("init", cljs.core.partial.call(null, lt.objs.clients.ws.store_client_BANG_, a));
};
lt.objs.clients.ws.__BEH__send_BANG_ = function(a, b) {
  return lt.objs.clients.ws.send_to.call(null, (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), [(new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(b), cljs.core.clj__GT_js.call(null, (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b))]);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.ws", "send!", "lt.objs.clients.ws/send!", 4061093404), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.ws.__BEH__send_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "send!", "send!", 1123226891), null], null), null));
lt.objs.clients.ws.server = function() {
  try {
    var a = lt.objs.clients.ws.io.listen(5678);
    a.set("log level", 1);
    a.server.on("error", function(b) {
      if (cljs.core._EQ_.call(null, b.code, "EADDRINUSE")) {
        return console.log("Default socket.io port already used. Retrying with a random port."), a.server.listen(0);
      }
      throw b;
    });
    a.server.on("listening", function() {
      return lt.objs.clients.ws.port = a.server.address().port;
    });
    a["static"].add("/lighttable/ws.js", cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.files.lt_home.call(null, "core/node_modules/lighttable/ws.js")], null)));
    a.sockets.on("connection", lt.objs.clients.ws.on_connect);
    return a;
  } catch (b) {
    return console.error.call(null, "Error starting socket.io server", b);
  }
}();
lt.objs.clients.ws.__BEH__kill_on_closed = function(a) {
  return lt.objs.clients.ws.server.close();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.ws", "kill-on-closed", "lt.objs.clients.ws/kill-on-closed", 1548479082), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.ws.__BEH__kill_on_closed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "closed", "closed", 3951351006), null], null), null));
lt.objs.sidebar.clients = {};
lt.objs.sidebar.clients.close_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.button", "span.button", 4282180040), "disconnect"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.clients.close_BANG_.call(null, a);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.clients.unset_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.button.unset", "span.button.unset", 4681740547), "unset"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, lt.objs.sidebar.clients.clients, new cljs.core.Keyword(null, "unset!", "unset!", 4468628874), a);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.clients.add_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2.toggle.add.button", "h2.toggle.add.button", 3718387527), "Add Connection"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selecting!", "selecting!", 3653545709));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.clients.choose_cancel = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2.toggle.button", "h2.toggle.button", 1431469146), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), "Choose a client type"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "cancel", "cancel", 3941147116));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.clients.__GT_active_QMARK_ = function(a, b) {
  var c = (new cljs.core.Keyword(null, "active", "active", 3885920888)).cljs$core$IFn$_invoke$arity$1(b), c = cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return function(b) {
      return cljs.core._EQ_.call(null, a, cljs.core.val.call(null, b));
    };
  }(c), c)), d = (new cljs.core.Keyword(null, "connected", "connected", 4729661051)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  return cljs.core.truth_(cljs.core.truth_(c) ? d : c) ? [cljs.core.str("active client-"), cljs.core.str(cljs.core.name.call(null, cljs.core.first.call(null, c)))].join("") : "";
};
lt.objs.sidebar.clients.client_item_STAR_ = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "connected", "connected", 4729661051)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a))], null), new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.details", "div.details", 4139669847), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "table", "table", 1124020032), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tr", "tr", 1013907952), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "td", "td", 1013907938), "Type"], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td", "td", 1013907938), (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], null)], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tr", "tr", 1013907952), new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td", "td", 1013907938), "Commands"], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td", "td", 1013907938), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), function() {
    return function c(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var e = cljs.core.seq.call(null, a);
          if (e) {
            if (cljs.core.chunked_seq_QMARK_.call(null, e)) {
              var f = cljs.core.chunk_first.call(null, e), g = cljs.core.count.call(null, f), h = cljs.core.chunk_buffer.call(null, g);
              a: {
                for (var k = 0;;) {
                  if (k < g) {
                    var l = cljs.core._nth.call(null, f, k);
                    cljs.core.chunk_append.call(null, h, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), l], null));
                    k += 1;
                  } else {
                    f = !0;
                    break a;
                  }
                }
                f = void 0;
              }
              return f ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), c.call(null, cljs.core.chunk_rest.call(null, e))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, h), null);
            }
            h = cljs.core.first.call(null, e);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), h], null), c.call(null, cljs.core.rest.call(null, e)));
          }
          return null;
        }
      }, null, null);
    }.call(null, (new cljs.core.Keyword(null, "commands", "commands", 4706336250)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  }()], null)], null)], null)], null), lt.objs.sidebar.clients.close_button.call(null, a), lt.objs.sidebar.clients.unset_button.call(null, a)], null)], null) : new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.connecting", "div.connecting", 1770928039), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.load-wrapper", "div.load-wrapper", 4672926811), new cljs.core.PersistentVector(null, 
  1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.img", "div.img", 2686470232)], null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), "Connecting.."], null)], null);
};
lt.objs.sidebar.clients.connector_QMARK_ = function(a) {
  return[cljs.core.str("clients "), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "selecting?", "selecting?", 3653545739)).cljs$core$IFn$_invoke$arity$1(a)) ? "selecting" : ""), cljs.core.str(cljs.core.truth_(lt.util.dom.has_class_QMARK_.call(null, (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.Keyword(null, "active", "active", 3885920888))) ? " active" : null)].join("");
};
lt.objs.sidebar.clients.client_item = function(a, b) {
  for (var c = crate.core.html.call(null, function() {
    var c = cljs.core.deref.call(null, b);
    return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
      return function(b) {
        return lt.objs.sidebar.clients.__GT_active_QMARK_.call(null, a, b);
      };
    }(c))], null), crate.binding.bound.call(null, c, function(a) {
      return function() {
        return lt.objs.sidebar.clients.client_item_STAR_.call(null, a);
      };
    }(c))], null);
  }()), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.sidebar.clients.connection_type = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), b.call(null, new cljs.core.Keyword(null, "name", "name", 1017277949))], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "p", "p", 1013904354), b.call(null, new cljs.core.Keyword(null, "desc", "desc", 1016984067))], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "selected", "selected", 2205476365));
    return(new cljs.core.Keyword(null, "connect", "connect", 1965255772)).cljs$core$IFn$_invoke$arity$1(b).call(null);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.sidebar.clients.connectors = function(a, b) {
  return function d(b) {
    return new cljs.core.LazySeq(null, function() {
      for (;;) {
        var f = cljs.core.seq.call(null, b);
        if (f) {
          if (cljs.core.chunked_seq_QMARK_.call(null, f)) {
            var g = cljs.core.chunk_first.call(null, f), h = cljs.core.count.call(null, g), k = cljs.core.chunk_buffer.call(null, h);
            a: {
              for (var l = 0;;) {
                if (l < h) {
                  var m = cljs.core._nth.call(null, g, l);
                  cljs.core.nth.call(null, m, 0, null);
                  m = cljs.core.nth.call(null, m, 1, null);
                  cljs.core.chunk_append.call(null, k, lt.objs.sidebar.clients.connection_type.call(null, a, m));
                  l += 1;
                } else {
                  g = !0;
                  break a;
                }
              }
              g = void 0;
            }
            return g ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), d.call(null, cljs.core.chunk_rest.call(null, f))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, k), null);
          }
          k = cljs.core.first.call(null, f);
          cljs.core.nth.call(null, k, 0, null);
          k = cljs.core.nth.call(null, k, 1, null);
          return cljs.core.cons.call(null, lt.objs.sidebar.clients.connection_type.call(null, a, k), d.call(null, cljs.core.rest.call(null, f)));
        }
        return null;
      }
    }, null, null);
  }.call(null, b);
};
lt.objs.sidebar.clients.connect_ui = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.sidebar.clients.connector_QMARK_), new cljs.core.Keyword(null, "tabindex", "tabindex", 4410954191), -1], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "div.list", "div.list", 1323928397), lt.objs.sidebar.clients.add_button.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), crate.binding.map_bound.call(null, cljs.core.partial.call(null, lt.objs.sidebar.clients.client_item, a), lt.objs.clients.cs)], null)], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
  "div.connector", "div.connector", 4086365858), lt.objs.sidebar.clients.choose_cancel.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "connectors", "connectors", 4533225784)], null)), cljs.core.partial.call(null, lt.objs.sidebar.clients.connectors, 
  a))], null)], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "sidebar.clients", "sidebar.clients", 3856103656), a);
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "sidebar.clients", "sidebar.clients", 3856103656), a);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.clients.__BEH__track_active_client = function(a) {
  return lt.object.merge_BANG_.call(null, lt.objs.sidebar.clients.clients, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "active", "active", 3885920888), (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "track-active-client", "lt.objs.sidebar.clients/track-active-client", 667432058), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__track_active_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "set-client", "set-client", 2248164104), null, 
new cljs.core.Keyword(null, "active", "active", 3885920888), null], null), null));
lt.objs.sidebar.clients.__BEH__unset_client = function(a, b) {
  var c = lt.objs.editor.pool.last_active.call(null), d = (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c)), d = cljs.core.first.call(null, cljs.core.filter.call(null, function(a, c) {
    return function(a) {
      return cljs.core._EQ_.call(null, b, cljs.core.val.call(null, a));
    };
  }(c, d), d));
  cljs.core.truth_(d) && lt.object.update_BANG_.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "client", "client", 3951159101)], null), cljs.core.dissoc, cljs.core.first.call(null, d));
  return lt.objs.editor.pool.focus_last.call(null);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "unset-client", "lt.objs.sidebar.clients/unset-client", 3530183417), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__unset_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "unset!", "unset!", 4468628874), null], null), null));
lt.objs.sidebar.clients.__BEH__selecting_BANG_ = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selecting?", "selecting?", 3653545739), !0], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "selecting!", "lt.objs.sidebar.clients/selecting!", 2845524117), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__selecting_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selecting!", "selecting!", 3653545709), null], null), null));
lt.objs.sidebar.clients.__BEH__done_selecting = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selecting?", "selecting?", 3653545739), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "done-selecting", "lt.objs.sidebar.clients/done-selecting", 1238663413), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__done_selecting, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "cancel", "cancel", 3941147116), null, new cljs.core.Keyword(null, 
"selected", "selected", 2205476365), null], null), null));
lt.objs.sidebar.clients.__BEH__hide_on_select = function(a) {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "hide-on-select", "lt.objs.sidebar.clients/hide-on-select", 1437883881), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__hide_on_select, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), null], null), null));
lt.objs.sidebar.clients.__BEH__focus_BANG_ = function(a) {
  return lt.util.dom.focus.call(null, lt.object.__GT_content.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "focus!", "lt.objs.sidebar.clients/focus!", 3198076775), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.clients.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "sidebar.clients", "lt.objs.sidebar.clients/sidebar.clients", 3045557908), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar.clients", "sidebar.clients", 3856103656), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "connect", new cljs.core.Keyword(null, "connectors", 
"connectors", 4533225784), cljs.core.sorted_map.call(null), new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.sidebar.clients.connect_ui.call(null, a);
});
lt.objs.sidebar.clients.clients = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.clients", "sidebar.clients", "lt.objs.sidebar.clients/sidebar.clients", 3045557908));
lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.rightbar, lt.objs.sidebar.clients.clients);
lt.objs.sidebar.clients.add_connector = function(a) {
  return lt.object.update_BANG_.call(null, lt.objs.sidebar.clients.clients, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "connectors", "connectors", 4533225784)], null), cljs.core.assoc, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a), a);
};
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "show-connect", "show-connect", 2165693836), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Connect: Toggle connect bar", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.clients.clients);
  return lt.object.raise.call(null, lt.objs.sidebar.clients.clients, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "show-add-connection", "show-add-connection", 3671605196), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Connect: Add Connection", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.clients.clients, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "force?", "force?", 4040082982), !0, new cljs.core.Keyword(null, "transient?", "transient?", 3584270951), !1], null));
  return lt.object.raise.call(null, lt.objs.sidebar.clients.clients, new cljs.core.Keyword(null, "selecting!", "selecting!", 3653545709));
}], null));
lt.objs.sidebar.clients.add_connector.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "name", "name", 1017277949), "Ports", new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Get the ports for the local TCP and Websocket servers", new cljs.core.Keyword(null, "connect", "connect", 1965255772), function() {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Ports", new cljs.core.Keyword(null, "body", "body", 1016933652), new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dl#ports", "dl#ports", 1671270345), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dt", "dt", 1013907458), "TCP: "], 
  null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dd", "dd", 1013907442), "" + cljs.core.str(lt.objs.clients.tcp.port)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dt", "dt", 1013907458), "WebSocket: "], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dd", "dd", 1013907442), "" + cljs.core.str(lt.objs.clients.ws.port)], 
  null)], null), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "label", "label", 1116631654), "ok"], null)], null)], null));
}], null));
lt.objs.version = {};
lt.objs.version.check_button = function() {
  for (var a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.button", "div.button", 2319197857), "Check for updates"], null)), b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.deploy.check_version.call(null, !0);
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.version.__BEH__on_show_refresh_eds = function(a) {
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "show", "show", 1017433711));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.version", "on-show-refresh-eds", "lt.objs.version/on-show-refresh-eds", 3549853297), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.version.__BEH__on_show_refresh_eds, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.version.__BEH__destroy_on_close = function(a) {
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.version", "destroy-on-close", "lt.objs.version/destroy-on-close", 2424697494), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.version.__BEH__destroy_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.version", "version-pane", "lt.objs.version/version-pane", 1326997590), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "version", "version", 1365512266), null], null), null), new cljs.core.Keyword(null, "name", "name", 1017277949), "Version", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  var b = lt.objs.editor.pool.create.call(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "mime", "mime", 1017255846), "markdown", new cljs.core.Keyword(null, "content", "content", 1965434859), (new cljs.core.Keyword(null, "content", "content", 1965434859)).cljs$core$IFn$_invoke$arity$1(lt.objs.files.open_sync.call(null, lt.objs.files.lt_home.call(null, "/core/changelog.md")))], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), b], null));
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#version-info", "div#version-info", 3819681447), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.info", "div.info", 1323843421), new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dl", "dl", 1013907450), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "dt", "dt", 1013907458), "Light Table version"], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dd", "dd", 1013907442), (new cljs.core.Keyword(null, "version", "version", 1365512266)).cljs$core$IFn$_invoke$arity$1(lt.objs.deploy.version)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dt", "dt", 1013907458), "Binary version"], 
  null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dd", "dd", 1013907442), lt.objs.deploy.binary_version.call(null)], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dt", "dt", 1013907458), "Plugins directory", new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dd", "dd", 1013907442), lt.objs.files.lt_user_dir.call(null, 
  "plugins")], null)], null)], null), lt.objs.version.check_button.call(null)], null), lt.objs.editor.__GT_elem.call(null, b)], null);
});
lt.objs.version.add = function() {
  var a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.version", "version-pane", "lt.objs.version/version-pane", 1326997590));
  lt.objs.tabs.add_BANG_.call(null, a);
  return lt.objs.tabs.active_BANG_.call(null, a);
};
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "version", "version", 1365512266), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "App: Light Table version", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.objs.version.add.call(null);
}], null));
lt.objs.langs = {};
lt.objs.langs.behaviors = {};
lt.objs.langs.behaviors.flat_parser = lt.objs.thread.thread_STAR_.call(null, function() {
  var a = argsArray(arguments), b = a.shift(), c = a.map(cljs.reader.read_string);
  (function(a, b, c) {
    return function(a, b, c) {
      return _send(a, b, cljs.core.pr_str.call(null, c), "clj");
    };
  })(a, b, c);
  c.unshift(b.obj);
  return function(a, b) {
    var c = require([cljs.core.str(ltpath), cljs.core.str("/core/node_modules/codemirror/addon/runmode/runmode.node.js")].join("")).StringStream, c = require([cljs.core.str(ltpath), cljs.core.str("/core/node_modules/lighttable/background/behaviorsParser.js")].join("")).parseFlat.call(null, new c(b));
    return _send(a, new cljs.core.Keyword(null, "parsed", "parsed", 4313460611), c);
  }.apply(null, c);
});
lt.objs.langs.behaviors.str__GT_ns_keyword = function(a) {
  return cljs.core.truth_(a) ? (a = cljs.core._EQ_.call(null, ":", cljs.core.first.call(null, a)) ? cljs.core.subs.call(null, a, 1) : a, a = clojure.string.split.call(null, a, "/"), cljs.core.seq.call(null, a) ? cljs.core.apply.call(null, cljs.core.keyword, a) : null) : null;
};
lt.objs.langs.behaviors.__GT_index = function(a) {
  return lt.objs.editor.pos__GT_index.call(null, a, lt.objs.editor.cursor.call(null, a));
};
lt.objs.langs.behaviors.idx__GT_item = function(a, b) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return(new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(cljs.core.second.call(null, b)) + 1 > a && a > (new cljs.core.Keyword(null, "start", "start", 1123661780)).cljs$core$IFn$_invoke$arity$1(cljs.core.second.call(null, b)) - 1;
  }, cljs.core.map_indexed.call(null, cljs.core.vector, b)));
};
lt.objs.langs.behaviors.idx__GT_entry_info = function(a, b) {
  var c = lt.objs.langs.behaviors.idx__GT_item.call(null, a, b);
  cljs.core.nth.call(null, c, 0, null);
  var c = cljs.core.nth.call(null, c, 1, null), d = lt.objs.langs.behaviors.idx__GT_item.call(null, a, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(c)), e = cljs.core.nth.call(null, d, 0, null);
  cljs.core.nth.call(null, d, 1, null);
  var d = (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(c), f = cljs.core.nth.call(null, d, 0, null), g = cljs.core.nth.call(null, d, 1, null);
  cljs.core.nthnext.call(null, d, 2);
  d = cljs.core.truth_(f) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(f)) : null;
  g = cljs.core.truth_(g) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(g)) : null;
  f = a > (new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(cljs.core.last.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(c))) + 1;
  c = cljs.core.not.call(null, e) && f ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(c)) : cljs.core.not.call(null, e) ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(c)) - 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? e : null;
  e = 1 < c ? c - 2 : null;
  return new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), d, new cljs.core.Keyword(null, "behavior", "behavior", 2524816836), g, new cljs.core.Keyword(null, "param-pos", "param-pos", 2966692998), e, new cljs.core.Keyword(null, "pos", "pos", 1014015430), c], null);
};
lt.objs.langs.behaviors.user_behavior_completions = function(a, b, c) {
  return cljs.core.truth_(cljs.core.truth_(a) ? cljs.core._EQ_.call(null, cljs.core.subs.call(null, a, 0, 1), ":") : a) ? cljs.core.map.call(null, function(a) {
    return{completion:"" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), text:"" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a))};
  }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.behaviors))) : cljs.core.map.call(null, function(a) {
    return cljs.core.not.call(null, (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a)) ? {completion:"" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), text:"" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a))} : {completion:"" + cljs.core.str((new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a)), text:(new cljs.core.Keyword(null, 
    "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(a)};
  }, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(a), new cljs.core.Keyword(null, "user", "user", 1017503549));
  }, cljs.core.vals.call(null, cljs.core.deref.call(null, lt.object.behaviors))));
};
lt.objs.langs.behaviors.completions = new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), function() {
  return cljs.core.map.call(null, function(a) {
    return{completion:"" + cljs.core.str(a), text:"" + cljs.core.str(a)};
  }, cljs.core.keys.call(null, cljs.core.deref.call(null, lt.object.tags)));
}, new cljs.core.Keyword(null, "behavior", "behavior", 2524816836), lt.objs.langs.behaviors.user_behavior_completions, new cljs.core.Keyword(null, "behavior-param", "behavior-param", 2920369348), function(a, b, c) {
  a = (new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(b);
  c = cljs.core.get.call(null, a, c);
  return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "list", "list", 1017226256)) ? cljs.core.fn_QMARK_.call(null, (new cljs.core.Keyword(null, "items", "items", 1114430258)).cljs$core$IFn$_invoke$arity$1(c)) ? (new cljs.core.Keyword(null, "items", "items", 1114430258)).cljs$core$IFn$_invoke$arity$1(c).call(null) : (new cljs.core.Keyword(null, "items", "items", 1114430258)).cljs$core$IFn$_invoke$arity$1(c) : 
  null;
}], null);
lt.objs.langs.behaviors.pos__GT_token_type = function(a) {
  var b = cljs.core._EQ_;
  return cljs.core.truth_(b.call(null, 0, a)) ? new cljs.core.Keyword(null, "tag", "tag", 1014018828) : cljs.core.truth_(b.call(null, 1, a)) ? new cljs.core.Keyword(null, "behavior", "behavior", 2524816836) : new cljs.core.Keyword(null, "behavior-param", "behavior-param", 2920369348);
};
lt.objs.langs.behaviors.__BEH__behavior_hints = function(a, b, c) {
  b = lt.objs.langs.behaviors.__GT_index.call(null, a);
  a = lt.objs.langs.behaviors.idx__GT_entry_info.call(null, b, (new cljs.core.Keyword(null, "entries", "entries", 3717298178)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  var d = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  b = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "pos", "pos", 1014015430));
  a = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "param-pos", "param-pos", 2966692998));
  var e = cljs.core.get.call(null, d, new cljs.core.Keyword(null, "behavior", "behavior", 2524816836));
  cljs.core.get.call(null, d, new cljs.core.Keyword(null, "tag", "tag", 1014018828));
  d = cljs.core.deref.call(null, lt.object.behaviors).call(null, e);
  b = lt.objs.langs.behaviors.pos__GT_token_type.call(null, b);
  return lt.objs.langs.behaviors.completions.call(null, b).call(null, c, d, a, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "behavior-hints", "lt.objs.langs.behaviors/behavior-hints", 2823940026), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__behavior_hints, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hints+", "hints+", 4091697745), null], null), null), new cljs.core.Keyword(null, 
"exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.plugins.auto-complete", "textual-hints", "lt.plugins.auto-complete/textual-hints", 1172342809)], null));
lt.objs.langs.behaviors.__BEH__show_info_on_move = function(a) {
  var b = lt.objs.langs.behaviors.__GT_index.call(null, a), b = lt.objs.langs.behaviors.idx__GT_entry_info.call(null, b, (new cljs.core.Keyword(null, "entries", "entries", 3717298178)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, b = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "param-pos", "param-pos", 2966692998)), d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, 
  "behavior", "behavior", 2524816836));
  cljs.core.get.call(null, c, new cljs.core.Keyword(null, "tag", "tag", 1014018828));
  c = cljs.core.deref.call(null, lt.object.behaviors).call(null, d);
  return cljs.core.truth_((new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$1(c)) ? lt.object.raise.call(null, lt.objs.langs.behaviors.helper, new cljs.core.Keyword(null, "show!", "show!", 1123317814), a, c, b) : lt.object.raise.call(null, lt.objs.langs.behaviors.helper, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "show-info-on-move", "lt.objs.langs.behaviors/show-info-on-move", 2847824345), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__show_info_on_move, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move", "move", 1017261891), null], null), null), 
new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 200);
lt.objs.langs.behaviors.__BEH__behavior_hint_pattern = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644), /[\w\-\>\:\*\$\?\<\!\+\.\"\\/]/], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "behavior-hint-pattern", "lt.objs.langs.behaviors/behavior-hint-pattern", 4504292902), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__behavior_hint_pattern, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 
773332388), null], null), null));
lt.objs.langs.behaviors.__BEH__on_changed = function(a) {
  return lt.objs.langs.behaviors.flat_parser.call(null, a, lt.objs.editor.__GT_val.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "on-changed", "lt.objs.langs.behaviors/on-changed", 1403950855), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__on_changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "change", "change", 3947235106), null, new cljs.core.Keyword(null, "create", 
"create", 3956577390), null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 100);
lt.objs.langs.behaviors.__BEH__parsed = function(a, b) {
  lt.object.merge_BANG_.call(null, a, cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move", "move", 1017261891));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "parsed", "lt.objs.langs.behaviors/parsed", 4692889658), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__parsed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "parsed", "parsed", 4313460611), null], null), null));
lt.objs.langs.behaviors.inline = function(a, b, c) {
  return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-result", "lt.objs.eval/inline-result", 1807255869), new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), b, new cljs.core.Keyword(null, "class", "class", 1108647146), "behavior-helper", new cljs.core.Keyword(null, "opts", "opts", 1017322386), c, new cljs.core.Keyword(null, "result", "result", 4374444943), lt.object.__GT_content.call(null, a), new cljs.core.Keyword(null, "above", 
  "above", 1106515727), cljs.core.boolean$.call(null, (new cljs.core.Keyword(null, "prev-line", "prev-line", 4421028544)).cljs$core$IFn$_invoke$arity$1(c) < (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c)), new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, new cljs.core.Keyword(null, "line", "line", 1017226086), lt.objs.editor.line_handle.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c))], null));
};
lt.objs.langs.behaviors.__GT_helper = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$2(a, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a))], 
  null), cljs.core.truth_((new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(a)) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), function() {
    return function l(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.param", "span.param", 1131663451), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(g), cljs.core.truth_((new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(g)) ? cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, new cljs.core.PersistentVector(null, 
                    2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre.example", "pre.example", 4358698129), (new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(g)], null)), " \x3d\x3e") : null], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), l.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.param", "span.param", 1131663451), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(e), cljs.core.truth_((new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(e)) ? cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, new cljs.core.PersistentVector(null, 
            2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "pre.example", "pre.example", 4358698129), (new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(e)], null)), " \x3d\x3e") : null], null), l.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, (new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(a));
  }()], null) : null], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.langs.behaviors.set_param = function(a, b) {
  for (var c = lt.util.dom.$$.call(null, "span.param", lt.object.__GT_content.call(null, a)), d = cljs.core.seq.call(null, c), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g);
      lt.util.dom.remove_class.call(null, h, new cljs.core.Keyword(null, "active", "active", 3885920888));
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        e = d, cljs.core.chunked_seq_QMARK_.call(null, e) ? (d = cljs.core.chunk_first.call(null, e), g = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = g) : (d = cljs.core.first.call(null, e), lt.util.dom.remove_class.call(null, d, new cljs.core.Keyword(null, "active", "active", 3885920888)), d = cljs.core.next.call(null, e), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.truth_(b) ? lt.util.dom.add_class.call(null, c[b], new cljs.core.Keyword(null, "active", "active", 3885920888)) : null;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "helper", "lt.objs.langs.behaviors/helper", 3930620895), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.behaviors.helper", "editor.behaviors.helper", 3298048942), null], null), null));
lt.objs.langs.behaviors.__BEH__helper__DOT__clear_BANG_ = function(a) {
  cljs.core.truth_((new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && (cljs.core.truth_(function() {
    var b = (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
    return cljs.core.truth_(b) ? cljs.core.deref.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) : b;
  }()) && lt.objs.editor._line_class.call(null, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "text", "text", 1017460895), "behavior-helper-line"), lt.object.raise.call(null, (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a)), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134)));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "content", "content", 1965434859), null], null));
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "mark", "mark", 1017248319), null, new cljs.core.Keyword(null, "behavior", "behavior", 2524816836), null, new cljs.core.Keyword(null, "line", "line", 1017226086), null, new cljs.core.Keyword(null, "ed", "ed", 1013907473), null], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "helper.clear!", "lt.objs.langs.behaviors/helper.clear!", 3552557557), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__helper__DOT__clear_BANG_, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Behaviors.helper: clear", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 
1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.langs.behaviors.__BEH__helper__DOT__show_BANG_ = function(a, b, c, d) {
  var e = lt.objs.editor.__GT_cursor.call(null, b);
  if (cljs.core.not_EQ_.call(null, c, (new cljs.core.Keyword(null, "behavior", "behavior", 2524816836)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) || cljs.core.not_EQ_.call(null, b, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
    cljs.core.truth_((new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && (lt.objs.editor._line_class.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "text", "text", 1017460895), "behavior-helper-line"), lt.object.raise.call(null, (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
    a)), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134))), lt.objs.editor._PLUS_line_class.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "text", "text", 1017460895), "behavior-helper-line"), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "content", "content", 1965434859), lt.objs.langs.behaviors.__GT_helper.call(null, c)], null)), lt.object.merge_BANG_.call(null, 
    a, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "mark", "mark", 1017248319), lt.objs.langs.behaviors.inline.call(null, a, b, cljs.core.assoc.call(null, e, new cljs.core.Keyword(null, "prev-line", "prev-line", 4421028544), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), new cljs.core.Keyword(null, "behavior", "behavior", 2524816836), c, new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, 
    "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "ed", "ed", 1013907473), b], null));
  }
  return lt.objs.langs.behaviors.set_param.call(null, a, d);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "helper.show!", "lt.objs.langs.behaviors/helper.show!", 4057136325), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.behaviors.__BEH__helper__DOT__show_BANG_, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Behaviors.helper: show", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, 
[new cljs.core.Keyword(null, "show!", "show!", 1123317814), null], null), null));
lt.objs.langs.behaviors.helper = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.langs.behaviors", "helper", "lt.objs.langs.behaviors/helper", 3930620895));
lt.objs.sidebar.navigate = {};
lt.objs.sidebar.navigate.file_filters = function(a) {
  return cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, a);
};
lt.objs.sidebar.navigate.populate_bg = lt.objs.thread.thread_STAR_.call(null, function() {
  var a = argsArray(arguments), b = a.shift(), c = a.map(cljs.reader.read_string);
  (function(a, b, c) {
    return function(a, b, c) {
      return _send(a, b, cljs.core.pr_str.call(null, c), "clj");
    };
  })(a, b, c);
  c.unshift(b.obj);
  return function(a, b) {
    var c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, g = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "ws", "ws", 1013908046)), h = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "pattern", "pattern", 4517781250)), k = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "lim", "lim", 1014011394)), l = require("fs"), m = require("path"), n = require([cljs.core.str(ltpath), cljs.core.str("/core/node_modules/lighttable/background/walkdir2.js")].join("")), 
    p = function(a, b, c) {
      return function(d, e) {
        var f = cljs.core.count.call(null, b.dirname(e)) + 1, g = c.call(null, e, {filter:RegExp(h), limit:k});
        return d.concat(g.paths.map(function(a, b, c, d, e) {
          return function(b) {
            return{full:b, rel:cljs.core.subs.call(null, b, a)};
          };
        }(f, g, a, b, c)));
      };
    }(l, m, n), c = cljs.core.to_array.call(null, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(g)).reduce(p, []), g = cljs.core.to_array.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(g)).map(function(a, b, c, d, e) {
      return function(a) {
        return{full:a, rel:b.basename(a)};
      };
    }(l, m, n, p, c)), g = c.concat(g);
    return _send(a, new cljs.core.Keyword(null, "workspace-files", "workspace-files", 2894015153), g);
  }.apply(null, c);
});
lt.objs.sidebar.navigate.__BEH__workspace_files = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0)], null));
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "workspace-files", "lt.objs.sidebar.navigate/workspace-files", 1473144805), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__workspace_files, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "workspace-files", "workspace-files", 2894015153), 
null], null), null));
lt.objs.sidebar.navigate.__BEH__populate_on_ws_update = function(a) {
  return lt.objs.sidebar.navigate.populate_bg.call(null, lt.objs.sidebar.navigate.sidebar_navigate, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "lim", "lim", 1014011394), (new cljs.core.Keyword(null, "file-limit", "file-limit", 1720007580)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.sidebar.navigate.sidebar_navigate)) - 1, new cljs.core.Keyword(null, "pattern", "pattern", 4517781250), lt.objs.files.ignore_pattern.source, new cljs.core.Keyword(null, 
  "ws", "ws", 1013908046), lt.objs.workspace.serialize.call(null, cljs.core.deref.call(null, a))], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "populate-on-ws-update", "lt.objs.sidebar.navigate/populate-on-ws-update", 3590833365), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__populate_on_ws_update, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "refresh", "refresh", 2099349069), 
null, new cljs.core.Keyword(null, "updated", "updated", 779473965), null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 150);
lt.objs.sidebar.navigate.__BEH__watched__DOT__create = function(a, b) {
  if (cljs.core.truth_(lt.objs.sidebar.navigate.file_filters.call(null, lt.objs.files.basename.call(null, b)))) {
    return null;
  }
  var c = lt.objs.files.parent.call(null, cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, 0, b.indexOf(a));
  }, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))))), c = cljs.core.count.call(null, c) + 1;
  lt.object.update_BANG_.call(null, lt.objs.sidebar.navigate.sidebar_navigate, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.conj, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "full", "full", 1017058817), b, new cljs.core.Keyword(null, "rel", "rel", 1014017035), cljs.core.subs.call(null, b, c)], null));
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.sidebar.navigate.sidebar_navigate)), new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "watched.create", "lt.objs.sidebar.navigate/watched.create", 3621776872), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__watched__DOT__create, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.create", "watched.create", 749519022), 
null], null), null));
lt.objs.sidebar.navigate.__BEH__watched__DOT__delete = function(a, b) {
  lt.object.update_BANG_.call(null, lt.objs.sidebar.navigate.sidebar_navigate, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), function(a) {
    return cljs.core.remove.call(null, function(a) {
      return cljs.core._EQ_.call(null, 0, (new cljs.core.Keyword(null, "full", "full", 1017058817)).cljs$core$IFn$_invoke$arity$1(a).indexOf(b));
    }, a);
  });
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.sidebar.navigate.sidebar_navigate)), new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "watched.delete", "lt.objs.sidebar.navigate/watched.delete", 3638485561), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__watched__DOT__delete, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), 
null], null), null));
lt.objs.sidebar.navigate.__BEH__focus_BANG_ = function(a) {
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "focus!", "lt.objs.sidebar.navigate/focus!", 4622481627), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.sidebar.navigate.__BEH__focus_on_show = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "focus-on-show", "lt.objs.sidebar.navigate/focus-on-show", 2752811662), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__focus_on_show, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.sidebar.navigate.__BEH__open_on_select = function(a, b) {
  return lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), (new cljs.core.Keyword(null, "full", "full", 1017058817)).cljs$core$IFn$_invoke$arity$1(b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "open-on-select", "lt.objs.sidebar.navigate/open-on-select", 2251841341), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__open_on_select, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select", "select", 4402849902), null], null), null));
lt.objs.sidebar.navigate.__BEH__escape_BANG_ = function(a) {
  lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "escape-navigate", "escape-navigate", 1610448047));
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "focus-last-editor", "focus-last-editor", 3007568513));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "escape!", "lt.objs.sidebar.navigate/escape!", 527020132), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__escape_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "escape!", "escape!", 3844244274), null], null), null));
lt.objs.sidebar.navigate.__BEH__pop_transient_on_select = function(a) {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "pop-transient-on-select", "lt.objs.sidebar.navigate/pop-transient-on-select", 3084691449), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__pop_transient_on_select, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "selected", "selected", 2205476365), 
null], null), null));
lt.objs.sidebar.navigate.__BEH__set_file_limit = function(a, b) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "file-limit", "file-limit", 1720007580), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "set-file-limit", "lt.objs.sidebar.navigate/set-file-limit", 1656879311), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.navigate.__BEH__set_file_limit, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Navigate: set maximum number of indexed files", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
[new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Number", new cljs.core.Keyword(null, "example", "example", 3985900764), 8E3], null)], null), new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, 
"user", "user", 1017503549));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "sidebar.navigate", "lt.objs.sidebar.navigate/sidebar.navigate", 4211647585), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "navigator", "navigator", 1766727113), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "navigate", new cljs.core.Keyword(null, "order", "order", 
1119910592), -3, new cljs.core.Keyword(null, "selected", "selected", 2205476365), 0, new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "file-limit", "file-limit", 1720007580), 8E3, new cljs.core.Keyword(null, "search", "search", 4402534682), "", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  var b = lt.objs.sidebar.command.filter_list.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "key", "key", 1014010321), new cljs.core.Keyword(null, "rel", "rel", 1014017035), new cljs.core.Keyword(null, "transform", "transform", 2066570974), function(a, b, e) {
    return[cljs.core.str("\x3ch2\x3e"), cljs.core.str(lt.objs.files.basename.call(null, a)), cljs.core.str("\x3c/h2\x3e\x3cp\x3e"), cljs.core.str(e), cljs.core.str("\x3c/p\x3e")].join("");
  }, new cljs.core.Keyword(null, "items", "items", 1114430258), crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "files", "files", 1111338473)), new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "file"], null));
  lt.object.add_tags.call(null, b, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "navigate.selector", "navigate.selector", 4592755502)], null));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "filter-list", "filter-list", 4372522309), b], null));
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.navigate", "div.navigate", 4481120672), lt.object.__GT_content.call(null, b)], null);
});
lt.objs.sidebar.navigate.sidebar_navigate = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.navigate", "sidebar.navigate", "lt.objs.sidebar.navigate/sidebar.navigate", 4211647585));
lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.rightbar, lt.objs.sidebar.navigate.sidebar_navigate);
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "navigate-workspace", "navigate-workspace", 3310481067), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Navigate: open navigate", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.navigate.sidebar_navigate, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "transient?", "transient?", 3584270951), !1], null));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "navigate-workspace-transient", "navigate-workspace-transient", 615022696), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Navigate: open navigate transient", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.sidebar.rightbar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.navigate.sidebar_navigate, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "transient?", "transient?", 3584270951), !0], null));
}], null));
lt.objs.sidebar.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "escape-navigate", "escape-navigate", 1610448047), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Navigate: exit navigate", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "close-sidebar", "close-sidebar", 1108494329));
  return lt.objs.sidebar.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "focus-last-editor", "focus-last-editor", 3007568513));
}], null));
lt.objs.langs.keymap = {};
lt.objs.langs.keymap.completions = new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), (new cljs.core.Keyword(null, "tag", "tag", 1014018828)).cljs$core$IFn$_invoke$arity$1(lt.objs.langs.behaviors.completions), new cljs.core.Keyword(null, "command", "command", 1964298941), lt.objs.command.completions], null);
lt.objs.langs.keymap.idx__GT_entry_info = function(a, b) {
  var c = lt.objs.langs.behaviors.idx__GT_item.call(null, a, b);
  cljs.core.nth.call(null, c, 0, null);
  var d = cljs.core.nth.call(null, c, 1, null), e = lt.objs.langs.behaviors.idx__GT_item.call(null, a, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(d)), c = cljs.core.nth.call(null, e, 0, null), f = cljs.core.nth.call(null, e, 1, null), e = cljs.core.truth_((new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(f)) ? lt.objs.langs.behaviors.idx__GT_item.call(null, a, (new cljs.core.Keyword(null, "tokens", "tokens", 
  4440684812)).cljs$core$IFn$_invoke$arity$1(f)) : null, g = cljs.core.nth.call(null, e, 0, null);
  cljs.core.nth.call(null, e, 1, null);
  var h = (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(d), k = cljs.core.nth.call(null, h, 0, null), e = cljs.core.nth.call(null, h, 1, null), h = cljs.core.nth.call(null, h, 2, null), k = cljs.core.truth_(k) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(k)) : null, l = a > (new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(cljs.core.last.call(null, 
  (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(d))) + 1, d = cljs.core.not.call(null, c) && l ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(d)) : cljs.core.not.call(null, c) ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(d)) - 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? c : null, l = a > 
  (new cljs.core.Keyword(null, "end", "end", 1014004813)).cljs$core$IFn$_invoke$arity$1(cljs.core.last.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(f))) + 1, g = cljs.core.truth_((new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(f)) ? cljs.core.not.call(null, g) && l ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(f)) : cljs.core.not.call(null, 
  g) ? cljs.core.count.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(f)) - 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? g : null : null, c = cljs.core.truth_(cljs.core.truth_(c) ? 1 < c : c) ? cljs.core.truth_(g) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 
  4440684812)).cljs$core$IFn$_invoke$arity$1(f)))) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(f)) : null : null, f = cljs.core.truth_(h) ? cljs.core.truth_((new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(h)) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", 
  "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null, (new cljs.core.Keyword(null, "tokens", "tokens", 4440684812)).cljs$core$IFn$_invoke$arity$1(h)))) : new cljs.core.Keyword(null, "else", "else", 1017020587) ? lt.objs.langs.behaviors.str__GT_ns_keyword.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(h)) : null : null;
  return new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "tag", "tag", 1014018828), k, new cljs.core.Keyword(null, "key", "key", 1014010321), e, new cljs.core.Keyword(null, "first-command", "first-command", 563271840), f, new cljs.core.Keyword(null, "command-at-pos", "command-at-pos", 2108663278), c, new cljs.core.Keyword(null, "arg-pos", "arg-pos", 4562713039), g, new cljs.core.Keyword(null, "pos", "pos", 1014015430), d], null);
};
lt.objs.langs.keymap.pos__GT_token_type = function(a) {
  var b = cljs.core._EQ_;
  return cljs.core.truth_(b.call(null, 0, a)) ? new cljs.core.Keyword(null, "tag", "tag", 1014018828) : cljs.core.truth_(b.call(null, 1, a)) ? new cljs.core.Keyword(null, "key", "key", 1014010321) : new cljs.core.Keyword(null, "command", "command", 1964298941);
};
lt.objs.langs.keymap.__BEH__keymap_hints = function(a, b, c) {
  var d = lt.objs.langs.behaviors.__GT_index.call(null, a);
  a = lt.objs.langs.keymap.idx__GT_entry_info.call(null, d, (new cljs.core.Keyword(null, "entries", "entries", 3717298178)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "arg-pos", "arg-pos", 4562713039));
  cljs.core.get.call(null, a, new cljs.core.Keyword(null, "command-at-pos", "command-at-pos", 2108663278));
  var e = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "pos", "pos", 1014015430));
  cljs.core.get.call(null, a, new cljs.core.Keyword(null, "key", "key", 1014010321));
  cljs.core.get.call(null, a, new cljs.core.Keyword(null, "tag", "tag", 1014018828));
  a = cljs.core.not.call(null, d) || 1 > d ? lt.objs.langs.keymap.completions.call(null, lt.objs.langs.keymap.pos__GT_token_type.call(null, e)) : null;
  return cljs.core.not.call(null, a) ? b : a.call(null, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "keymap-hints", "lt.objs.langs.keymap/keymap-hints", 592920276), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__keymap_hints, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hints+", "hints+", 4091697745), null], null), null), new cljs.core.Keyword(null, 
"exclusive", "exclusive", 2700522E3), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword("lt.plugins.auto-complete", "textual-hints", "lt.plugins.auto-complete/textual-hints", 1172342809)], null));
lt.objs.langs.keymap.__BEH__show_info_on_move = function(a) {
  var b = lt.objs.langs.behaviors.__GT_index.call(null, a), b = lt.objs.langs.keymap.idx__GT_entry_info.call(null, b, (new cljs.core.Keyword(null, "entries", "entries", 3717298178)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = cljs.core.seq_QMARK_.call(null, b) ? cljs.core.apply.call(null, cljs.core.hash_map, b) : b, d = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "first-command", "first-command", 563271840)), b = cljs.core.get.call(null, c, new cljs.core.Keyword(null, 
  "arg-pos", "arg-pos", 4562713039)), c = cljs.core.get.call(null, c, new cljs.core.Keyword(null, "command-at-pos", "command-at-pos", 2108663278)), d = cljs.core.get.call(null, (new cljs.core.Keyword(null, "commands", "commands", 4706336250)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.command.manager)), cljs.core.truth_(c) ? c : d);
  return cljs.core.truth_(d) ? lt.object.raise.call(null, lt.objs.langs.keymap.helper, new cljs.core.Keyword(null, "show!", "show!", 1123317814), a, d, b) : lt.object.raise.call(null, lt.objs.langs.keymap.helper, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "show-info-on-move", "lt.objs.langs.keymap/show-info-on-move", 836516040), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__show_info_on_move, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move", "move", 1017261891), null], null), null), new cljs.core.Keyword(null, 
"debounce", "debounce", 1556599227), 200);
lt.objs.langs.keymap.__BEH__keymap_hint_pattern = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hint-pattern", "hint-pattern", 2825267644), /[\w\-\>\:\*\$\?\<\!\+\.\"\\/]/], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "keymap-hint-pattern", "lt.objs.langs.keymap/keymap-hint-pattern", 2903988014), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__keymap_hint_pattern, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "object.instant", "object.instant", 773332388), null], 
null), null));
lt.objs.langs.keymap.__BEH__on_changed = function(a) {
  return lt.objs.langs.behaviors.flat_parser.call(null, a, lt.objs.editor.__GT_val.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "on-changed", "lt.objs.langs.keymap/on-changed", 3532361178), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__on_changed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "change", "change", 3947235106), null, new cljs.core.Keyword(null, "create", "create", 
3956577390), null], null), null), new cljs.core.Keyword(null, "debounce", "debounce", 1556599227), 50);
lt.objs.langs.keymap.__BEH__parsed = function(a, b) {
  lt.object.merge_BANG_.call(null, a, cljs.core.js__GT_clj.call(null, b, new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "move", "move", 1017261891));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "parsed", "lt.objs.langs.keymap/parsed", 4292388517), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__parsed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "parsed", "parsed", 4313460611), null], null), null));
lt.objs.langs.keymap.inline = function(a, b, c) {
  return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.eval", "inline-result", "lt.objs.eval/inline-result", 1807255869), new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null, "ed", "ed", 1013907473), b, new cljs.core.Keyword(null, "class", "class", 1108647146), "behavior-helper", new cljs.core.Keyword(null, "opts", "opts", 1017322386), c, new cljs.core.Keyword(null, "result", "result", 4374444943), lt.object.__GT_content.call(null, a), new cljs.core.Keyword(null, "above", 
  "above", 1106515727), cljs.core.boolean$.call(null, (new cljs.core.Keyword(null, "prev-line", "prev-line", 4421028544)).cljs$core$IFn$_invoke$arity$1(c) < (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c)), new cljs.core.Keyword(null, "loc", "loc", 1014011570), c, new cljs.core.Keyword(null, "line", "line", 1017226086), lt.objs.editor.line_handle.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(c))], null));
};
lt.objs.langs.keymap.__GT_helper = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), (new cljs.core.Keyword(null, "desc", "desc", 1016984067)).cljs$core$IFn$_invoke$arity$2(a, (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(a))], 
  null), cljs.core.truth_((new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(a)) ? function() {
    return function l(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(g), cljs.core.truth_((new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(g)) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
                    "pre.example", "pre.example", 4358698129), (new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(g)], null) : null], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), l.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), (new cljs.core.Keyword(null, "label", "label", 1116631654)).cljs$core$IFn$_invoke$arity$1(e), cljs.core.truth_((new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(e)) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, 
            "pre.example", "pre.example", 4358698129), (new cljs.core.Keyword(null, "example", "example", 3985900764)).cljs$core$IFn$_invoke$arity$1(e)], null) : null], null), l.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, (new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(a));
  }() : null], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.langs.keymap.set_param = function(a, b) {
  for (var c = lt.util.dom.$$.call(null, "span", lt.object.__GT_content.call(null, a)), d = cljs.core.seq.call(null, c), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g);
      lt.util.dom.remove_class.call(null, h, new cljs.core.Keyword(null, "active", "active", 3885920888));
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        e = d, cljs.core.chunked_seq_QMARK_.call(null, e) ? (d = cljs.core.chunk_first.call(null, e), g = cljs.core.chunk_rest.call(null, e), e = d, f = cljs.core.count.call(null, d), d = g) : (d = cljs.core.first.call(null, e), lt.util.dom.remove_class.call(null, d, new cljs.core.Keyword(null, "active", "active", 3885920888)), d = cljs.core.next.call(null, e), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return cljs.core.truth_(b) ? lt.util.dom.add_class.call(null, c[b], new cljs.core.Keyword(null, "active", "active", 3885920888)) : null;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "helper", "lt.objs.langs.keymap/helper", 4251548354), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.keymap.helper", "editor.keymap.helper", 2159399120), null], null), null));
lt.objs.langs.keymap.__BEH__helper__DOT__show_BANG_ = function(a, b, c, d) {
  var e = lt.objs.editor.__GT_cursor.call(null, b);
  if (cljs.core.not_EQ_.call(null, c, (new cljs.core.Keyword(null, "key", "key", 1014010321)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) || cljs.core.not_EQ_.call(null, b, (new cljs.core.Keyword(null, "ed", "ed", 1013907473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
    cljs.core.truth_((new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) && (lt.objs.editor._line_class.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "text", "text", 1017460895), "behavior-helper-line"), lt.object.raise.call(null, (new cljs.core.Keyword(null, "mark", "mark", 1017248319)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
    a)), new cljs.core.Keyword(null, "clear!", "clear!", 3951036134))), lt.objs.editor._PLUS_line_class.call(null, b, (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "text", "text", 1017460895), "behavior-helper-line"), lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "content", "content", 1965434859), lt.objs.langs.keymap.__GT_helper.call(null, c)], null)), lt.object.merge_BANG_.call(null, 
    a, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "mark", "mark", 1017248319), lt.objs.langs.keymap.inline.call(null, a, b, cljs.core.assoc.call(null, e, new cljs.core.Keyword(null, "prev-line", "prev-line", 4421028544), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), new cljs.core.Keyword(null, "key", "key", 1014010321), c, new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, 
    "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(e), new cljs.core.Keyword(null, "ed", "ed", 1013907473), b], null));
  }
  return lt.objs.langs.keymap.set_param.call(null, a, d);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "helper.show!", "lt.objs.langs.keymap/helper.show!", 3924890652), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.langs.keymap.__BEH__helper__DOT__show_BANG_, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Keymap.helper: show", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, 
"show!", "show!", 1123317814), null], null), null));
lt.objs.langs.keymap.helper = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.langs.keymap", "helper", "lt.objs.langs.keymap/helper", 4251548354));
lt.objs.search = {};
lt.objs.search.search_BANG_ = lt.objs.thread.thread_STAR_.call(null, function() {
  var a = argsArray(arguments), b = a.shift(), c = a.map(cljs.reader.read_string), d = function(a, b, c) {
    return function(a, b, c) {
      return _send(a, b, cljs.core.pr_str.call(null, c), "clj");
    };
  }(a, b, c);
  c.unshift(b.obj);
  return function(a, b) {
    var c = require([cljs.core.str(ltpath), cljs.core.str("/core/node_modules/replace")].join("")), h = function() {
      var a = cljs.core.re_seq.call(null, /^\/(.+)\/$/, (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(b));
      return cljs.core.truth_(a) ? RegExp(cljs.core.second.call(null, cljs.core.first.call(null, a))) : (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(b);
    }(), c = c.call(null, cljs.core.clj__GT_js.call(null, new cljs.core.PersistentArrayMap(null, 7, [new cljs.core.Keyword(null, "regex", "regex", 1122296761), h, new cljs.core.Keyword(null, "exclude", "exclude", 3987722572), cljs.core.truth_((new cljs.core.Keyword(null, "exclude", "exclude", 3987722572)).cljs$core$IFn$_invoke$arity$1(b)) ? RegExp((new cljs.core.Keyword(null, "exclude", "exclude", 3987722572)).cljs$core$IFn$_invoke$arity$1(b)) : null, new cljs.core.Keyword(null, "recursive", "recursive", 
    2179684260), !0, new cljs.core.Keyword(null, "ignoreCase", "ignoreCase", 1893967764), !cljs.core.boolean$.call(null, cljs.core.re_seq.call(null, /[A-Z]/, (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(b))), new cljs.core.Keyword(null, "replacement", "replacement", 1444823428), (new cljs.core.Keyword(null, "replacement", "replacement", 1444823428)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "paths", "paths", 1120343136), (new cljs.core.Keyword(null, 
    "paths", "paths", 1120343136)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "result", "result", 4374444943), function(b, c) {
      return function(b) {
        return _send(a, new cljs.core.Keyword(null, "result", "result", 4374444943), b);
      };
    }(c, h)], null)));
    return d.call(null, a, new cljs.core.Keyword(null, "done-searching", "done-searching", 1230467105), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "total", "total", 1124454070), c.totalFiles, new cljs.core.Keyword(null, "time", "time", 1017464383), c.time, new cljs.core.Keyword(null, "replace?", "replace?", 583571325), cljs.core.boolean$.call(null, (new cljs.core.Keyword(null, "replacement", "replacement", 1444823428)).cljs$core$IFn$_invoke$arity$1(b))], null));
  }.apply(null, c);
});
lt.objs.search.result_threshold = 500;
lt.objs.search.location = function() {
  var a = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), c = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), d = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), e = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "hierarchy", "hierarchy", 3129050535), cljs.core.get_global_hierarchy.call(null));
  return new cljs.core.MultiFn("location", cljs.core.identity, new cljs.core.Keyword(null, "default", "default", 2558708147), e, a, b, c, d);
}();
cljs.core._add_method.call(null, lt.objs.search.location, "\x3cworkspace\x3e", function(a) {
  return cljs.core.apply.call(null, cljs.core.concat, cljs.core.juxt.call(null, new cljs.core.Keyword(null, "folders", "folders", 4625622327), new cljs.core.Keyword(null, "files", "files", 1111338473)).call(null, lt.objs.workspace.serialize.call(null, cljs.core.deref.call(null, lt.objs.workspace.current_ws))));
});
cljs.core._add_method.call(null, lt.objs.search.location, new cljs.core.Keyword(null, "default", "default", 2558708147), function(a) {
  return new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [a], null);
});
lt.objs.search.string__GT_loc = function(a) {
  return cljs.core.mapcat.call(null, cljs.core.comp.call(null, lt.objs.search.location, clojure.string.trim), cljs.core.remove.call(null, cljs.core.empty_QMARK_, clojure.string.split.call(null, a, ",")));
};
lt.objs.search.__GT_res = function(a) {
  return lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".res", ".res", 1015387428), lt.object.__GT_content.call(null, a));
};
lt.objs.search.__GT_entry = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p.entry", "p.entry", 3043677414), crate.core.raw.call(null, [cljs.core.str("\x3cspan class\x3d'line'\x3e"), cljs.core.str(a.line), cljs.core.str("\x3c/span\x3e\x3cpre\x3e"), cljs.core.str(a.text), cljs.core.str("\x3c/pre\x3e")].join(""))], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), b);
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "goto-line", "goto-line", 2802035088), a.line);
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.search.__GT_result_item = function(a) {
  for (var b = crate.core.html.call(null, function() {
    var b = a.file;
    return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p.path", "p.path", 4266284629), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.file", "span.file", 4619643154), lt.objs.files.basename.call(null, b)], null), "(", lt.objs.files.parent.call(null, 
    b), ")"], null), function() {
      return function(a) {
        return function n(b) {
          return new cljs.core.LazySeq(null, function(a) {
            return function() {
              for (;;) {
                var c = cljs.core.seq.call(null, b);
                if (c) {
                  if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
                    var d = cljs.core.chunk_first.call(null, c), e = cljs.core.count.call(null, d), f = cljs.core.chunk_buffer.call(null, e);
                    a: {
                      for (var g = 0;;) {
                        if (g < e) {
                          var h = cljs.core._nth.call(null, d, g);
                          cljs.core.chunk_append.call(null, f, lt.objs.search.__GT_entry.call(null, h, a));
                          g += 1;
                        } else {
                          d = !0;
                          break a;
                        }
                      }
                      d = void 0;
                    }
                    return d ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), n.call(null, cljs.core.chunk_rest.call(null, c))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), null);
                  }
                  f = cljs.core.first.call(null, c);
                  return cljs.core.cons.call(null, lt.objs.search.__GT_entry.call(null, f, a), n.call(null, cljs.core.rest.call(null, c)));
                }
                return null;
              }
            };
          }(a), null, null);
        };
      }(b).call(null, a.results);
    }()], null);
  }()), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.search.search_box = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.search", "input.search", 1599745982), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Search"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 
  4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "searcher.search", "searcher.search", 1646738643), a);
    return lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input.search", "input.search", 1599745982), lt.object.__GT_content.call(null, a)).select();
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "searcher.search", "searcher.search", 1646738643));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.search.replace_box = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.replace", "input.replace", 1121297410), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Replace"], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 
  4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "searcher.replace", "searcher.replace", 2578069901), a);
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "searcher.replace", "searcher.replace", 2578069901));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.search.replace_all_button = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button.replace", "button.replace", 910855018), "Replace All"], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "searcher.replace-all", "searcher.replace-all", 1613341281));
  }], null))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.search.location_box = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.loc", "input.loc", 2719736462), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "Locations", new cljs.core.Keyword(null, "value", "value", 1125876963), "\x3cworkspace\x3e"], null)], null)), c = cljs.core.seq.call(null, 
  cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "searcher.location", "searcher.location", 4589776032), a);
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "searcher.location", "searcher.location", 4589776032));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.search.__GT_search_info = function(a) {
  var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a)), c = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".replace", ".replace", 673297976), lt.object.__GT_content.call(null, a));
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".loc", ".loc", 1015381956), lt.object.__GT_content.call(null, a));
  return new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "search", "search", 4402534682), lt.util.dom.val.call(null, b), new cljs.core.Keyword(null, "replace", "replace", 2108401190), lt.util.dom.val.call(null, c), new cljs.core.Keyword(null, "loc", "loc", 1014011570), lt.util.dom.val.call(null, a)], null);
};
lt.objs.search.__BEH__on_close = function(a) {
  return lt.objs.tabs.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "on-close", "lt.objs.search/on-close", 852635541), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.search.__BEH__clear_BANG_ = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "timeout", "timeout", 3994960083), null, new cljs.core.Keyword(null, "results", "results", 2111450984), [], new cljs.core.Keyword(null, "result-count", "result-count", 4392277713), 0, new cljs.core.Keyword("lt.objs.search", "time", "lt.objs.search/time", 714622424), null, new cljs.core.Keyword("lt.objs.search", "filesSearched", "lt.objs.search/filesSearched", 2511844033), null, new cljs.core.Keyword(null, 
  "position", "position", 1761709211), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0, -1], null)], null));
  return lt.util.dom.empty.call(null, lt.objs.search.__GT_res.call(null, a));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "clear!", "lt.objs.search/clear!", 4760733279), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__clear_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.search.__BEH__search_BANG_ = function(a, b) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  var c;
  c = cljs.core.truth_(b) ? b : lt.objs.search.__GT_search_info.call(null, a);
  if (cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(c))) {
    return null;
  }
  lt.object.merge_BANG_.call(null, a, c);
  lt.objs.notifos.working.call(null, "Searching workspace...");
  return lt.objs.search.search_BANG_.call(null, a, cljs.core.assoc.call(null, c, new cljs.core.Keyword(null, "exclude", "exclude", 3987722572), lt.objs.files.ignore_pattern.source, new cljs.core.Keyword(null, "paths", "paths", 1120343136), lt.objs.search.string__GT_loc.call(null, (new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(c))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "search!", "lt.objs.search/search!", 3582214748), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__search_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "search!", "search!", 2982232811), null], null), null));
lt.objs.search.__BEH__replace_BANG_ = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  var b = lt.objs.search.__GT_search_info.call(null, a);
  if (cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "search", "search", 4402534682)).cljs$core$IFn$_invoke$arity$1(b))) {
    return null;
  }
  lt.object.merge_BANG_.call(null, a, b);
  lt.objs.notifos.working.call(null, "Replacing all in workspace...");
  return lt.objs.search.search_BANG_.call(null, a, cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "replacement", "replacement", 1444823428), (new cljs.core.Keyword(null, "replace", "replace", 2108401190)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "exclude", "exclude", 3987722572), lt.objs.files.ignore_pattern.source, new cljs.core.Keyword(null, "paths", "paths", 1120343136), lt.objs.search.string__GT_loc.call(null, (new cljs.core.Keyword(null, "loc", "loc", 1014011570)).cljs$core$IFn$_invoke$arity$1(b))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "replace!", "lt.objs.search/replace!", 1148909304), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__replace_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "replace!", "replace!", 583571295), null], null), null));
lt.objs.search.__BEH__done_searching = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword("lt.objs.search", "time", "lt.objs.search/time", 714622424), (new cljs.core.Keyword(null, "time", "time", 1017464383)).cljs$core$IFn$_invoke$arity$1(b) / 1E3, new cljs.core.Keyword("lt.objs.search", "filesSearched", "lt.objs.search/filesSearched", 2511844033), (new cljs.core.Keyword(null, "total", "total", 1124454070)).cljs$core$IFn$_invoke$arity$1(b)], null));
  return cljs.core.truth_((new cljs.core.Keyword(null, "replace?", "replace?", 583571325)).cljs$core$IFn$_invoke$arity$1(b)) ? (lt.objs.notifos.done_working.call(null, [cljs.core.str("Replaced "), cljs.core.str((new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), cljs.core.str(" results in "), cljs.core.str((new cljs.core.Keyword(null, "time", "time", 1017464383)).cljs$core$IFn$_invoke$arity$1(b) / 1E3), cljs.core.str("s.")].join("")), 
  lt.util.dom.empty.call(null, lt.objs.search.__GT_res.call(null, a))) : lt.objs.notifos.done_working.call(null, [cljs.core.str("Found "), cljs.core.str((new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), cljs.core.str(" results searching "), cljs.core.str((new cljs.core.Keyword(null, "total", "total", 1124454070)).cljs$core$IFn$_invoke$arity$1(b)), cljs.core.str(" files in "), cljs.core.str((new cljs.core.Keyword(null, 
  "time", "time", 1017464383)).cljs$core$IFn$_invoke$arity$1(b) / 1E3), cljs.core.str("s.")].join(""));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "done-searching", "lt.objs.search/done-searching", 1038716850), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__done_searching, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "done-searching", "done-searching", 1230467105), null], null), null));
lt.objs.search.__BEH__next_BANG_ = function(a) {
  if (0 < (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).length) {
    var b = (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c = (new cljs.core.Keyword(null, "position", "position", 1761709211)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nth.call(null, c, 1, null), c = c + 1 >= b[d].results.length ? d + 1 >= b.length ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [0, 0], null) : 
    new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d + 1, 0], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d, c + 1], null), d = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nth.call(null, c, 1, null), b = b[d];
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "position", "position", 1761709211), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d, c], null)], null));
    lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), b.file);
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "goto-line", "goto-line", 2802035088), b.results[c].line);
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "next!", "lt.objs.search/next!", 614385297), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__next_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "next!", "next!", 1118619392), null], null), null));
lt.objs.search.__BEH__prev_BANG_ = function(a) {
  if (0 < (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).length) {
    var b = (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c = (new cljs.core.Keyword(null, "position", "position", 1761709211)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = cljs.core.nth.call(null, c, 0, null), c = cljs.core.nth.call(null, c, 1, null), d = 0 > c - 1 ? 0 > d - 1 ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b.length - 1, b[b.length - 1].results.length - 
    1], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d - 1, b[d - 1].results.length - 1], null) : new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [d, c - 1], null), b = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), c = (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))[b];
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "position", "position", 1761709211), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [b, d], null)], null));
    lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), c.file);
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "goto-line", "goto-line", 2802035088), c.results[d].line);
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "prev!", "lt.objs.search/prev!", 611383121), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__prev_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "prev!", "prev!", 1120835520), null], null), null));
lt.objs.search.__BEH__on_result = function(a, b) {
  var c = cljs.core.count.call(null, b.results), d = {file:b.file, results:b.results.slice(0, lt.objs.search.result_threshold - (new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))};
  (new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)) < lt.objs.search.result_threshold && lt.util.dom.append.call(null, lt.objs.search.__GT_res.call(null, a), lt.objs.search.__GT_result_item.call(null, d));
  (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).push(d);
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)], null), cljs.core._PLUS_, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "on-result", "lt.objs.search/on-result", 564457174), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__on_result, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "result", "result", 4374444943), null], null), null));
lt.objs.search.__BEH__focus = function(a) {
  return lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, a)).focus();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "focus", "lt.objs.search/focus", 620932027), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.search.__BEH__focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null, new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.search.result_count = function(a) {
  return cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, cljs.core.truth_((new cljs.core.Keyword("lt.objs.search", "time", "lt.objs.search/time", 714622424)).cljs$core$IFn$_invoke$arity$1(a)) ? cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, "s"), (new cljs.core.Keyword("lt.objs.search", "time", "lt.objs.search/time", 714622424)).cljs$core$IFn$_invoke$arity$1(a)), 
  " in ") : null), (new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(a) > lt.objs.search.result_threshold ? cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core._conj.call(null, cljs.core.List.EMPTY, ")"), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), lt.objs.search.result_threshold], null)), " (showing ") : null), new cljs.core.PersistentVector(null, 
  3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span", "span", 1017440956), (new cljs.core.Keyword(null, "result-count", "result-count", 4392277713)).cljs$core$IFn$_invoke$arity$1(a), " results"], null)), "Found  ");
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.search", "workspace-search", "lt.objs.search/workspace-search", 4343830723), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "searcher", "searcher", 1902549959), null], null), null), new cljs.core.Keyword(null, "results", "results", 2111450984), [], new cljs.core.Keyword(null, "name", "name", 1017277949), "Search results", 
new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  lt.object.add_tags.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.platform.win_QMARK_.call(null) ? new cljs.core.Keyword(null, "searcher.win", "searcher.win", 1645682229) : new cljs.core.Keyword(null, "searcher.unix", "searcher.unix", 3419097843)], null));
  return new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.search-results", "div.search-results", 980356928), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.res", "ul.res", 4464738363)], null), new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.searcher", "div.searcher", 3267271812), new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), crate.binding.bound.call(null, a, lt.objs.search.result_count)], null), lt.objs.search.search_box.call(null, a), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), lt.objs.search.replace_box.call(null, a), lt.objs.search.replace_all_button.call(null, a)], null), lt.objs.search.location_box.call(null, a)], null)], 
  null);
});
lt.objs.search.searcher = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.search", "workspace-search", "lt.objs.search/workspace-search", 4343830723));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "searcher.search", "searcher.search", 1646738643), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Searcher: Execute search", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  a = cljs.core.truth_(a) ? a : lt.objs.search.__GT_search_info.call(null, lt.objs.search.searcher);
  return lt.object.raise.call(null, lt.objs.search.searcher, new cljs.core.Keyword(null, "search!", "search!", 2982232811), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "searcher.show", "searcher.show", 3419032680), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Searcher: Show", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  if (cljs.core.truth_(a) && (a = lt.objs.editor.selection.call(null, a), cljs.core.truth_(a) && !cljs.core.truth_(clojure.string.blank_QMARK_.call(null, a)))) {
    var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, ".search", ".search", 2278031048), lt.object.__GT_content.call(null, lt.objs.search.searcher));
    lt.util.dom.val.call(null, b, a);
  }
  return lt.objs.tabs.add_or_focus_BANG_.call(null, lt.objs.search.searcher);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "searcher.next", "searcher.next", 3418881118), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Searcher: Next result", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.search.searcher, new cljs.core.Keyword(null, "next!", "next!", 1118619392));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "searcher.prev", "searcher.prev", 3418952606), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Searcher: Prev result", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.search.searcher, new cljs.core.Keyword(null, "prev!", "prev!", 1120835520));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "searcher.replace-all", "searcher.replace-all", 1613341281), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Searcher: Replace all", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.search.searcher, new cljs.core.Keyword(null, "replace!", "replace!", 583571295));
}], null));
lt.objs.jump_stack = {};
lt.objs.jump_stack.jump_to = function(a, b) {
  lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "open-path", "open-path", 2513940794), a);
  var c = lt.objs.editor.pool.last_active.call(null);
  lt.objs.editor.move_cursor.call(null, c, b);
  return lt.objs.editor.center_cursor.call(null, c);
};
lt.objs.jump_stack.__BEH__jump_stack__DOT__push = function(a, b, c, d) {
  var e = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
  b = lt.objs.editor.__GT_cursor.call(null, b);
  if (cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, c))) {
    return lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Could not find file: "), cljs.core.str(c)].join(""), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  lt.objs.jump_stack.jump_to.call(null, c, d);
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "stack", "stack", 1123661306)], null), cljs.core.conj, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [e, b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.jump-stack", "jump-stack.push", "lt.objs.jump-stack/jump-stack.push", 1506692737), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.jump_stack.__BEH__jump_stack__DOT__push, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "jump-stack.push!", "jump-stack.push!", 4063822260), null], null), 
null));
lt.objs.jump_stack.__BEH__jump_stack__DOT__pop = function(a, b, c) {
  b = (new cljs.core.Keyword(null, "stack", "stack", 1123661306)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a));
  if (cljs.core.empty_QMARK_.call(null, b)) {
    return lt.objs.notifos.set_msg_BANG_.call(null, "Nowhere left to jump", new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  c = cljs.core.last.call(null, b);
  b = cljs.core.nth.call(null, c, 0, null);
  c = cljs.core.nth.call(null, c, 1, null);
  if (cljs.core.not.call(null, lt.objs.files.exists_QMARK_.call(null, b))) {
    return lt.objs.notifos.set_msg_BANG_.call(null, [cljs.core.str("Could not find file: "), cljs.core.str(b)].join(""), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), "error"], null));
  }
  lt.objs.jump_stack.jump_to.call(null, b, c);
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "stack", "stack", 1123661306)], null), cljs.core.pop);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.jump-stack", "jump-stack.pop", "lt.objs.jump-stack/jump-stack.pop", 2910989048), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.jump_stack.__BEH__jump_stack__DOT__pop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "jump-stack.pop!", "jump-stack.pop!", 973735431), null], null), null));
lt.objs.jump_stack.jump_stack = lt.object.create.call(null, lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.jump-stack", "jump-stack", "lt.objs.jump-stack/jump-stack", 4175468555), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "jump-stack", "jump-stack", 3641533339)], null), new cljs.core.Keyword(null, "stack", "stack", 1123661306), cljs.core.PersistentVector.EMPTY));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.jump-to-definition-at-cursor", "editor.jump-to-definition-at-cursor", 1126411772), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Jump to definition at cursor", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "editor.jump-to-definition-at-cursor!", "editor.jump-to-definition-at-cursor!", 4501637705)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.unjump", "editor.unjump", 4124148058), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Jump back to where you jumped from", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.object.raise.call(null, lt.objs.jump_stack.jump_stack, new cljs.core.Keyword(null, "jump-stack.pop!", "jump-stack.pop!", 973735431));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.jump-to", "editor.jump-to", 1972540523), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Jump to file/pos", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a, b) {
  var c = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(c) ? lt.object.raise.call(null, lt.objs.jump_stack.jump_stack, new cljs.core.Keyword(null, "jump-stack.push!", "jump-stack.push!", 4063822260), c, a, b) : null;
}], null));
lt.objs.sidebar.workspace = {};
lt.objs.sidebar.workspace.files_and_folders = function(a) {
  a = lt.objs.workspace.files_and_folders.call(null, a);
  return new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.mapv.call(null, function(a) {
    return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.file", "lt.objs.sidebar.workspace/workspace.file", 4597702653), a);
  }, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(a)), new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.mapv.call(null, function(a) {
    return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.folder", "lt.objs.sidebar.workspace/workspace.folder", 1951235275), a);
  }, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(a))], null);
};
lt.objs.sidebar.workspace.root_folder = function(a) {
  return lt.object.add_tags.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.folder", "lt.objs.sidebar.workspace/workspace.folder", 1951235275), a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "workspace.folder.root", "workspace.folder.root", 4665807355)], null));
};
lt.objs.sidebar.workspace.root_file = function(a) {
  return lt.object.add_tags.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.file", "lt.objs.sidebar.workspace/workspace.file", 4597702653), a), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "workspace.file.root", "workspace.file.root", 532025197)], null));
};
lt.objs.sidebar.workspace.remove_child = function(a, b) {
  return cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, b, new cljs.core.Keyword(null, "workspace.file", "workspace.file", 1768213159))) ? lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), function(a) {
    return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), a));
  }) : lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), function(a) {
    return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([b], !0), a));
  });
};
lt.objs.sidebar.workspace.find_by_path = function(a) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, function(b) {
    return cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), a);
  }, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "tree-item", "tree-item", 999403348))));
};
lt.objs.sidebar.workspace.__BEH__add_ws_folder = function(a, b) {
  return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "add-ws-folder", "lt.objs.sidebar.workspace/add-ws-folder", 3077183263), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__add_ws_folder, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "workspace.add.folder!", "workspace.add.folder!", 1443047615), 
null], null), null));
lt.objs.sidebar.workspace.__BEH__add_ws_file = function(a, b) {
  lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.file!", "add.file!", 4237252106), b);
  return lt.object.raise.call(null, cljs.core.first.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "opener", "opener", 4298292201))), new cljs.core.Keyword(null, "open!", "open!", 1119852169), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "add-ws-file", "lt.objs.sidebar.workspace/add-ws-file", 3890882145), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__add_ws_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "workspace.add.file!", "workspace.add.file!", 821993457), null], 
null), null));
lt.objs.sidebar.workspace.__BEH__on_open_ls = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open?", "open?", 1119852199), !0], null));
  if (cljs.core.truth_((new cljs.core.Keyword(null, "realized?", "realized?", 4433874243)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
    return null;
  }
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "realized?", "realized?", 4433874243), !0], null));
  lt.object.merge_BANG_.call(null, a, lt.objs.sidebar.workspace.files_and_folders.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
  var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "ul", "ul", 1013907977), lt.object.__GT_content.call(null, a));
  a = lt.util.dom.scroll_width.call(null, b);
  for (var b = cljs.core.seq.call(null, lt.util.dom.children.call(null, b)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.util.dom.css.call(null, f, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), a], null));
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), d = cljs.core.chunk_rest.call(null, c), c = b, f = cljs.core.count.call(null, b), b = d, d = f) : (f = cljs.core.first.call(null, c), lt.util.dom.css.call(null, f, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), a], null)), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-open-ls", "lt.objs.sidebar.workspace/on-open-ls", 636886726), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_open_ls, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", "open!", 1119852169), null], null), null));
lt.objs.sidebar.workspace.__BEH__refresh = function(a) {
  for (var b = cljs.core.seq.call(null, cljs.core.concat.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.destroy_BANG_.call(null, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.object.destroy_BANG_.call(null, b), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "refresh", "refresh", 2099349069), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.merge_BANG_.call(null, a, lt.objs.sidebar.workspace.files_and_folders.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "refresh", "lt.objs.sidebar.workspace/refresh", 4526611623), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__refresh, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_close = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open?", "open?", 1119852199), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-close", "lt.objs.sidebar.workspace/on-close", 2768332408), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_open_file = function(a) {
  return lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-open-file", "lt.objs.sidebar.workspace/on-open-file", 535182993), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_open_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", "open!", 1119852169), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_remove = function(a, b) {
  return cljs.core.truth_(lt.object.has_tag_QMARK_.call(null, b, new cljs.core.Keyword(null, "workspace.folder", "workspace.folder", 4355811161))) ? lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "remove.folder!", "remove.folder!", 1531423099), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) : lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "remove.file!", 
  "remove.file!", 3382976429), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-remove", "lt.objs.sidebar.workspace/on-remove", 3327022336), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_remove, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "remove!", "remove!", 2105740175), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_clear = function(a) {
  return lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-clear", "lt.objs.sidebar.workspace/on-clear", 2768322211), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_clear, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_ws_add = function(a, b) {
  return cljs.core.truth_(lt.objs.files.file_QMARK_.call(null, b)) ? lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.conj, lt.objs.sidebar.workspace.root_file.call(null, b)) : lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
  [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), cljs.core.conj, lt.objs.sidebar.workspace.root_folder.call(null, b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-ws-add", "lt.objs.sidebar.workspace/on-ws-add", 2946370468), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_ws_add, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "add", "add", 1014000659), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_ws_remove = function(a, b) {
  var c = lt.objs.sidebar.workspace.find_by_path.call(null, b);
  cljs.core.truth_(lt.objs.files.file_QMARK_.call(null, b)) ? lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), function(a) {
    return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([c], !0), a));
  }) : lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), function(a) {
    return cljs.core.vec.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([c], !0), a));
  });
  return lt.object.destroy_BANG_.call(null, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-ws-remove", "lt.objs.sidebar.workspace/on-ws-remove", 3507655435), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_ws_remove, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "remove", "remove", 4374260726), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_ws_set = function(a) {
  a = cljs.core.deref.call(null, a);
  var b = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  a = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "files", "files", 1111338473));
  b = cljs.core.get.call(null, b, new cljs.core.Keyword(null, "folders", "folders", 4625622327));
  return lt.object.merge_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.mapv.call(null, lt.objs.sidebar.workspace.root_file, a), new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.mapv.call(null, lt.objs.sidebar.workspace.root_folder, b), new cljs.core.Keyword(null, "open-dirs", "open-dirs", 2513590939), cljs.core.PersistentHashSet.EMPTY], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-ws-set", "lt.objs.sidebar.workspace/on-ws-set", 2946355043), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_ws_set, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "set", "set", 1014018004), null], null), null));
lt.objs.sidebar.workspace.__BEH__track_and_watch_open_dirs = function(a) {
  lt.objs.workspace.watch_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "open-dirs", "open-dirs", 2513590939)], null), cljs.core.conj, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "track-and-watch-open-dirs", "lt.objs.sidebar.workspace/track-and-watch-open-dirs", 3304823039), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__track_and_watch_open_dirs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open!", "open!", 
1119852169), null], null), null));
lt.objs.sidebar.workspace.__BEH__untrack_closed_dirs = function(a) {
  return lt.object.update_BANG_.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "open-dirs", "open-dirs", 2513590939)], null), cljs.core.disj, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "untrack-closed-dirs", "lt.objs.sidebar.workspace/untrack-closed-dirs", 3049036598), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__untrack_closed_dirs, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close!", "close!", 3951350939), null], 
null), null));
lt.objs.sidebar.workspace.__BEH__watch_open_dirs_paths = function(a, b) {
  return cljs.core.concat.call(null, b, (new cljs.core.Keyword(null, "open-dirs", "open-dirs", 2513590939)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.sidebar.workspace.tree)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "watch-open-dirs-paths", "lt.objs.sidebar.workspace/watch-open-dirs-paths", 4677839158), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__watch_open_dirs_paths, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watch-paths+", "watch-paths+", 
2265407277), null], null), null));
lt.objs.sidebar.workspace.__BEH__watched__DOT__delete = function(a, b) {
  var c = lt.objs.sidebar.workspace.find_by_path.call(null, b);
  if (cljs.core.truth_(c)) {
    var d = lt.objs.sidebar.workspace.find_by_path.call(null, lt.objs.files.parent.call(null, b));
    cljs.core.truth_(d) && lt.objs.sidebar.workspace.remove_child.call(null, d, c);
    return lt.object.destroy_BANG_.call(null, c);
  }
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "watched.delete", "lt.objs.sidebar.workspace/watched.delete", 3594533591), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__watched__DOT__delete, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), 
null], null), null));
lt.objs.sidebar.workspace.__BEH__watched__DOT__create = function(a, b) {
  if (cljs.core.truth_(function() {
    var a = lt.objs.sidebar.workspace.find_by_path.call(null, b);
    return cljs.core.truth_(a) ? cljs.core.not.call(null, cljs.core.re_seq.call(null, lt.objs.files.ignore_pattern, lt.objs.files.basename.call(null, b))) : a;
  }())) {
    return null;
  }
  var c = lt.objs.sidebar.workspace.find_by_path.call(null, lt.objs.files.parent.call(null, b));
  return cljs.core.truth_(c) ? cljs.core.truth_((new cljs.core.Keyword(null, "realized?", "realized?", 4433874243)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, c))) ? cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, b)) ? lt.object.update_BANG_.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), cljs.core.conj, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", 
  "workspace.folder", "lt.objs.sidebar.workspace/workspace.folder", 1951235275), b)) : lt.object.update_BANG_.call(null, c, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.conj, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.file", "lt.objs.sidebar.workspace/workspace.file", 4597702653), b)) : null : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "watched.create", "lt.objs.sidebar.workspace/watched.create", 3712177670), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__watched__DOT__create, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "watched.create", "watched.create", 749519022), 
null], null), null));
lt.objs.sidebar.workspace.__BEH__on_drop = function(a, b) {
  for (var c = b.dataTransfer.files.length, d = 0;;) {
    if (d < c) {
      var e = b.dataTransfer.files[d].path;
      cljs.core.truth_(lt.objs.files.dir_QMARK_.call(null, e)) ? lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.folder!", "add.folder!", 2151595160), e) : lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "add.file!", "add.file!", 4237252106), e);
      d += 1;
    } else {
      return null;
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-drop", "lt.objs.sidebar.workspace/on-drop", 2605653733), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_drop, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "drop", "drop", 1016996449), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_menu = function(a, b) {
  var c = cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "order", "order", 1119910592), lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), cljs.core.PersistentVector.EMPTY));
  return lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, c));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-menu", "lt.objs.sidebar.workspace/on-menu", 2605385333), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), null], null), null));
lt.objs.sidebar.workspace.__BEH__on_root_menu = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator", new cljs.core.Keyword(null, "order", "order", 1119910592), 9], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Remove from workspace", new cljs.core.Keyword(null, "order", "order", 1119910592), 10, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.Keyword(null, "remove!", "remove!", 2105740175), a);
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "on-root-menu", "lt.objs.sidebar.workspace/on-root-menu", 2948325830), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__on_root_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), null], null), null));
lt.objs.sidebar.workspace.__BEH__subfile_menu = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Duplicate", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "duplicate!", "duplicate!", 3906488296));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Rename", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete", new cljs.core.Keyword(null, "order", "order", 1119910592), 3, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "delete!", "delete!", 2564367176));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "subfile-menu", "lt.objs.sidebar.workspace/subfile-menu", 2571608754), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__subfile_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), null], null), null));
lt.objs.sidebar.workspace.__BEH__subfolder_menu = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "New file", new cljs.core.Keyword(null, "order", "order", 1119910592), 0, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "new-file!", "new-file!", 3612062506));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Rename", new cljs.core.Keyword(null, "order", "order", 1119910592), 2, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator", new cljs.core.Keyword(null, "order", "order", 1119910592), 3], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "New folder", new cljs.core.Keyword(null, "order", "order", 1119910592), 4, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "new-folder!", "new-folder!", 2639811E3));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete folder", new cljs.core.Keyword(null, "order", "order", 1119910592), 5, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "delete!", "delete!", 2564367176));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Refresh folder", new cljs.core.Keyword(null, "order", "order", 1119910592), 6, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "subfolder-menu", "lt.objs.sidebar.workspace/subfolder-menu", 1537446372), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__subfolder_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), null], null), 
null));
lt.objs.sidebar.workspace.__BEH__force_delete_file = function(a) {
  lt.objs.files.delete_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a));
  lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "force-delete-file", "lt.objs.sidebar.workspace/force-delete-file", 1104151110), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__force_delete_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "force-delete!", "force-delete!", 2129098342), 
null], null), null));
lt.objs.sidebar.workspace.__BEH__delete_file = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Delete this file?", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("This will delete "), cljs.core.str((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), cljs.core.str(" from disk and cannot be undone.")].join(""), new cljs.core.Keyword(null, "buttons", "buttons", 
  1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete file", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "force-delete!", "force-delete!", 2129098342));
  }], null), lt.objs.popup.cancel_button], null)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "delete-file", "lt.objs.sidebar.workspace/delete-file", 2141449508), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__delete_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "delete!", "delete!", 2564367176), null], null), null));
lt.objs.sidebar.workspace.__BEH__force_delete_folder = function(a) {
  lt.objs.files.delete_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  lt.util.dom.remove.call(null, lt.object.__GT_content.call(null, a));
  lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.delete", "watched.delete", 766354781), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "force-delete-folder", "lt.objs.sidebar.workspace/force-delete-folder", 3126323540), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__force_delete_folder, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "force-delete!", "force-delete!", 2129098342), 
null], null), null));
lt.objs.sidebar.workspace.__BEH__delete_folder = function(a) {
  return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Delete this folder?", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("This will delete "), cljs.core.str((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), cljs.core.str(" from disk and cannot be undone.")].join(""), new cljs.core.Keyword(null, "buttons", 
  "buttons", 1255256819), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete folder", new cljs.core.Keyword(null, "action", "action", 3885920680), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "force-delete!", "force-delete!", 2129098342));
  }], null), lt.objs.popup.cancel_button], null)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "delete-folder", "lt.objs.sidebar.workspace/delete-folder", 915989682), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__delete_folder, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "delete!", "delete!", 2564367176), null], null), null));
lt.objs.sidebar.workspace.__BEH__new_file_BANG_ = function(a) {
  var b;
  b = cljs.core.first.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  cljs.core.truth_(b) ? (b = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b)), b = cljs.core.truth_(b) ? lt.objs.files.ext.call(null, b) : null) : b = "txt";
  b = lt.objs.files.join.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), [cljs.core.str("untitled."), cljs.core.str(b)].join(""));
  b = lt.objs.files.next_available_name.call(null, b);
  var c = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.file", "lt.objs.sidebar.workspace/workspace.file", 4597702653), b);
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "files", "files", 1111338473)], null), cljs.core.conj, c);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open?", "open?", 1119852199), !0], null));
  lt.objs.files.save.call(null, b, "");
  lt.object.raise.call(null, lt.objs.opener.opener, new cljs.core.Keyword(null, "open!", "open!", 1119852169), b);
  return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "new-file!", "lt.objs.sidebar.workspace/new-file!", 539117946), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__new_file_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "new-file!", "new-file!", 3612062506), null], null), null));
lt.objs.sidebar.workspace.__BEH__new_folder_BANG_ = function(a) {
  var b = lt.objs.files.join.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), "NewFolder"), b = lt.objs.files.next_available_name.call(null, b), c = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.folder", "lt.objs.sidebar.workspace/workspace.folder", 1951235275), b);
  lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "folders", "folders", 4625622327)], null), cljs.core.conj, c);
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open?", "open?", 1119852199), !0], null));
  lt.objs.files.mkdir.call(null, b);
  return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "new-folder!", "lt.objs.sidebar.workspace/new-folder!", 3994412844), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__new_folder_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "new-folder!", "new-folder!", 2639811E3), null], null), 
null));
lt.objs.sidebar.workspace.__BEH__rename_folder = function(a, b) {
  var c = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = lt.objs.files.join.call(null, lt.objs.files.parent.call(null, c), b);
  if (cljs.core._EQ_.call(null, c, d)) {
    return null;
  }
  if (cljs.core.truth_(function() {
    var a = cljs.core.not_EQ_.call(null, clojure.string.lower_case.call(null, c), clojure.string.lower_case.call(null, d));
    return a ? lt.objs.files.exists_QMARK_.call(null, d) : a;
  }())) {
    return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "Folder already exists.", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("The folder "), cljs.core.str(d), cljs.core.str(" already exists, you'll have to pick a different name.")].join(""), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
    [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "ok", new cljs.core.Keyword(null, "post-action", "post-action", 4039331701), function() {
      lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.cancel", "rename.cancel", 1388940956));
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
    }], null)], null)], null));
  }
  var e = lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "workspace.folder.root", "workspace.folder.root", 4665807355));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "path", "path", 1017337751), d, new cljs.core.Keyword(null, "realized?", "realized?", 4433874243), !1], null));
  lt.objs.files.move_BANG_.call(null, c, d);
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  return cljs.core.truth_(e) ? lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "rename!", "rename!", 2106237973), c, d) : lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.rename", "watched.rename", 1167218416), c, d);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-folder", "lt.objs.sidebar.workspace/rename-folder", 3567769509), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_folder, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename", "rename", 4374276784), null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_file = function(a, b) {
  var c = (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = lt.objs.files.join.call(null, lt.objs.files.parent.call(null, c), b);
  if (cljs.core._EQ_.call(null, c, d)) {
    return null;
  }
  if (cljs.core.truth_(function() {
    var a = cljs.core.not_EQ_.call(null, clojure.string.lower_case.call(null, c), clojure.string.lower_case.call(null, d));
    return a ? lt.objs.files.exists_QMARK_.call(null, d) : a;
  }())) {
    return lt.objs.popup.popup_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "header", "header", 4087600639), "File already exists.", new cljs.core.Keyword(null, "body", "body", 1016933652), [cljs.core.str("The file"), cljs.core.str(d), cljs.core.str(" already exists, you'll have to pick a different name.")].join(""), new cljs.core.Keyword(null, "buttons", "buttons", 1255256819), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, 
    [new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "ok", new cljs.core.Keyword(null, "post-action", "post-action", 4039331701), function() {
      lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.cancel", "rename.cancel", 1388940956));
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522));
    }], null)], null)], null));
  }
  cljs.core.truth_(function() {
    var b = lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "workspace.folder.root", "workspace.folder.root", 4665807355));
    return cljs.core.truth_(b) ? b : lt.object.has_tag_QMARK_.call(null, a, new cljs.core.Keyword(null, "workspace.file.root", "workspace.file.root", 532025197));
  }()) ? lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "rename!", "rename!", 2106237973), c, d) : lt.object.raise.call(null, lt.objs.workspace.current_ws, new cljs.core.Keyword(null, "watched.rename", "watched.rename", 1167218416), c, d);
  lt.objs.files.move_BANG_.call(null, c, d);
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "path", "path", 1017337751), d], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-file", "lt.objs.sidebar.workspace/rename-file", 3270197399), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename", "rename", 4374276784), null], null), null));
lt.objs.sidebar.workspace.__BEH__start_rename = function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926), !0], null));
  var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  a = cljs.core.count.call(null, lt.objs.files.without_ext.call(null, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))));
  var c = lt.util.dom.scroll_width.call(null, lt.util.dom.parent.call(null, b));
  lt.util.dom.css.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "width", "width", 1127031096), c], null));
  lt.util.dom.focus.call(null, b);
  return lt.util.dom.selection.call(null, b, 0, a, "forward");
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "start-rename", "lt.objs.sidebar.workspace/start-rename", 2390201321), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__start_rename, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "start-rename!", "start-rename!", 3285764522), null], null), 
null));
lt.objs.sidebar.workspace.__BEH__rename_focus = function(a) {
  return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "tree.rename", "tree.rename", 1095020288), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-focus", "lt.objs.sidebar.workspace/rename-focus", 2321367913), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_focus, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename.focus", "rename.focus", 4215768474), null], null), 
null));
lt.objs.sidebar.workspace.__BEH__rename_submit = function(a) {
  var b = lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)));
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926), !1], null));
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename", "rename", 4374276784), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-submit", "lt.objs.sidebar.workspace/rename-submit", 3408558955), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_submit, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename.submit!", "rename.submit!", 1632100299), null], 
null), null));
lt.objs.sidebar.workspace.__BEH__rename_blur = function(a) {
  lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "tree.rename", "tree.rename", 1095020288));
  return cljs.core.truth_((new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.submit!", "rename.submit!", 1632100299)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-blur", "lt.objs.sidebar.workspace/rename-blur", 3270310748), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_blur, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename.blur", "rename.blur", 839974025), null], null), null));
lt.objs.sidebar.workspace.__BEH__rename_cancel = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926), !1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "rename-cancel", "lt.objs.sidebar.workspace/rename-cancel", 1720510665), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__rename_cancel, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "rename.cancel!", "rename.cancel!", 4050107817), null], 
null), null));
lt.objs.sidebar.workspace.__BEH__duplicate = function(a) {
  var b = lt.objs.files.without_ext.call(null, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), b = [cljs.core.str(b), cljs.core.str(" copy."), cljs.core.str(lt.objs.files.ext.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))))].join(""), b = lt.objs.files.join.call(null, lt.objs.files.parent.call(null, (new cljs.core.Keyword(null, 
  "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), b);
  return lt.objs.files.copy.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "duplicate", "lt.objs.sidebar.workspace/duplicate", 4108375543), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__duplicate, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "duplicate!", "duplicate!", 3906488296), null], null), null));
lt.objs.sidebar.workspace.__BEH__destroy_sub_tree = function(a) {
  a = cljs.core.seq.call(null, cljs.core.concat.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      lt.object.destroy_BANG_.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), lt.object.destroy_BANG_.call(null, e), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "destroy-sub-tree", "lt.objs.sidebar.workspace/destroy-sub-tree", 2888041796), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__destroy_sub_tree, new cljs.core.Keyword(null, "trigger", "trigger", 4248979754), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null], null), 
null));
lt.objs.sidebar.workspace.file_toggle = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p", "p", 1013904354), crate.binding.bound.call(null, a, function() {
    return lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  })], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
    lt.util.dom.prevent.call(null, b);
    return lt.util.dom.stop_propagation.call(null, b);
  }, new cljs.core.Keyword(null, "dblclick", "dblclick", 3463991820), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "dblopen!", "dblopen!", 3475189659));
  }, new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "open!", "open!", 1119852169));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.workspace.folder_toggle = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "p.folder", "p.folder", 3836630814), crate.binding.bound.call(null, a, function() {
    return[cljs.core.str(lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))), cljs.core.str(lt.objs.files.separator)].join("");
  })], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
    lt.util.dom.prevent.call(null, b);
    return lt.util.dom.stop_propagation.call(null, b);
  }, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return cljs.core.not.call(null, (new cljs.core.Keyword(null, "open?", "open?", 1119852199)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "open!", "open!", 1119852169)) : lt.object.raise.call(null, a, new cljs.core.Keyword(null, "close!", "close!", 3951350939));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.workspace.sub_folders = function(a) {
  a = cljs.core.seq_QMARK_.call(null, a) ? cljs.core.apply.call(null, cljs.core.hash_map, a) : a;
  var b = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "root?", "root?", 1122602767));
  cljs.core.get.call(null, a, new cljs.core.Keyword(null, "path", "path", 1017337751));
  var c = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "open?", "open?", 1119852199)), d = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "files", "files", 1111338473)), e = cljs.core.get.call(null, a, new cljs.core.Keyword(null, "folders", "folders", 4625622327));
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), [cljs.core.str(cljs.core.truth_(b) ? null : "sub "), cljs.core.str(cljs.core.truth_(c) ? "opened" : null)].join("")], null), function() {
    var a = function n(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, lt.object.__GT_content.call(null, g));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), n.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, lt.object.__GT_content.call(null, e), n.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    };
    return a.call(null, cljs.core.sort_by.call(null, function(a) {
      return function(a) {
        return clojure.string.lower_case.call(null, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
      };
    }(a), e));
  }(), function() {
    var a = function n(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, lt.object.__GT_content.call(null, g));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), n.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, lt.object.__GT_content.call(null, e), n.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    };
    return a.call(null, cljs.core.sort_by.call(null, function(a) {
      return function(a) {
        return clojure.string.lower_case.call(null, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
      };
    }(a), d));
  }()], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, c, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, a, k, h);
      g += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (f = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, a, c, f), b = cljs.core.next.call(null, b), c = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.sidebar.workspace.rename_input = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.rename", "input.rename", 1571488084), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "value", "value", 1125876963), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a)))], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.focus", "rename.focus", 4215768474));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.blur", "rename.blur", 839974025));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.workspace.renameable = function(a, b, c) {
  return cljs.core.truth_(b) ? lt.objs.sidebar.workspace.rename_input.call(null, a) : c;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.file", "lt.objs.sidebar.workspace/workspace.file", 4597702653), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tree-item", "tree-item", 999403348), null, new cljs.core.Keyword(null, "workspace.file", "workspace.file", 1768213159), null], null), null), new cljs.core.Keyword(null, "path", 
"path", 1017337751), "", new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "path", "path", 1017337751), b], null));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
    return cljs.core.truth_((new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926)).cljs$core$IFn$_invoke$arity$1(a)) ? "renaming" : "";
  })], null), lt.objs.sidebar.workspace.rename_input.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tree-item", "div.tree-item", 4651075127), lt.objs.sidebar.workspace.file_toggle.call(null, a)], null)], null);
});
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.folder", "lt.objs.sidebar.workspace/workspace.folder", 1951235275), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "tree-item", "tree-item", 999403348), null, new cljs.core.Keyword(null, "workspace.folder", "workspace.folder", 4355811161), null], null), null), new cljs.core.Keyword(null, 
"path", "path", 1017337751), "", new cljs.core.Keyword(null, "open?", "open?", 1119852199), !1, new cljs.core.Keyword(null, "realized?", "realized?", 4433874243), !1, new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "path", "path", 1017337751), b], null));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, function(a) {
    return cljs.core.truth_((new cljs.core.Keyword(null, "renaming?", "renaming?", 2774795926)).cljs$core$IFn$_invoke$arity$1(a)) ? "renaming" : "";
  })], null), lt.objs.sidebar.workspace.rename_input.call(null, a), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tree-item", "div.tree-item", 4651075127), cljs.core.truth_(b) ? lt.objs.sidebar.workspace.folder_toggle.call(null, a) : null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), crate.binding.bound.call(null, a, lt.objs.sidebar.workspace.sub_folders)], 
  null)], null)], null);
});
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.root", "lt.objs.sidebar.workspace/workspace.root", 4597214311), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "workspace.root", "workspace.root", 1768576525), null], null), null), new cljs.core.Keyword(null, "root?", "root?", 1122602767), !0, new cljs.core.Keyword(null, "open-dirs", "open-dirs", 
2513590939), cljs.core.PersistentHashSet.EMPTY, new cljs.core.Keyword(null, "files", "files", 1111338473), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "folders", "folders", 4625622327), cljs.core.PersistentVector.EMPTY, new cljs.core.Keyword(null, "open?", "open?", 1119852199), !0, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.tree-root", "div.tree-root", 4651338758), crate.binding.bound.call(null, a, lt.objs.sidebar.workspace.sub_folders)], null);
});
lt.objs.sidebar.workspace.tree = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.root", "lt.objs.sidebar.workspace/workspace.root", 4597214311));
lt.objs.sidebar.workspace.input = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input", "input", 1114262332), new cljs.core.PersistentArrayMap.fromArray([new cljs.core.Keyword(null, "type", "type", 1017479852), "file", a, !0, new cljs.core.Keyword(null, "style", "style", 1123684643), "display:none;"], !0, !1)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, 
  cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "change", "change", 3947235106), function() {
    return cljs.core.empty_QMARK_.call(null, lt.util.dom.val.call(null, this)) ? null : lt.object.raise.call(null, lt.objs.sidebar.workspace.tree, b, lt.util.dom.val.call(null, this));
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.sidebar.workspace.open_folder = function() {
  return lt.objs.dialogs.dir.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.Keyword(null, "workspace.add.folder!", "workspace.add.folder!", 1443047615));
};
lt.objs.sidebar.workspace.open_file = function() {
  return lt.objs.dialogs.file.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.Keyword(null, "workspace.add.file!", "workspace.add.file!", 821993457));
};
lt.objs.sidebar.workspace.button = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), a], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), b], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.sidebar.workspace.recent = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "recent!", "recent!", 2096199832));
};
lt.objs.sidebar.workspace.recents_item = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.folders", "ul.folders", 4036689120), function() {
    return function l(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.objs.files.basename.call(null, g), lt.objs.files.separator], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), l.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.objs.files.basename.call(null, e), lt.objs.files.separator], null), l.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, (new cljs.core.Keyword(null, "folders", "folders", 4625622327)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  }()], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.files", "ul.files", 1539775442), function() {
    return function l(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.objs.files.basename.call(null, g)], null));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), l.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.objs.files.basename.call(null, e)], null), l.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, (new cljs.core.Keyword(null, "files", "files", 1111338473)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  }()], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
    lt.util.dom.prevent.call(null, b);
    return lt.util.dom.stop_propagation.call(null, b);
  }, new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "select!", "select!", 2992004631));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.workspace.back_button = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), "Select a workspace"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "tree!", "tree!", 1124529077));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.sidebar.workspace.recents = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), lt.objs.sidebar.workspace.back_button.call(null, a), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), function() {
    return function m(a) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var b = cljs.core.seq.call(null, a);
          if (b) {
            if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
              var c = cljs.core.chunk_first.call(null, b), d = cljs.core.count.call(null, c), e = cljs.core.chunk_buffer.call(null, d);
              a: {
                for (var f = 0;;) {
                  if (f < d) {
                    var g = cljs.core._nth.call(null, c, f);
                    cljs.core.chunk_append.call(null, e, lt.object.__GT_content.call(null, g));
                    f += 1;
                  } else {
                    c = !0;
                    break a;
                  }
                }
                c = void 0;
              }
              return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), m.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, e), null);
            }
            e = cljs.core.first.call(null, b);
            return cljs.core.cons.call(null, lt.object.__GT_content.call(null, e), m.call(null, cljs.core.rest.call(null, b)));
          }
          return null;
        }
      }, null, null);
    }.call(null, b);
  }()], null)], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.sidebar.workspace.__BEH__recent_BANG_ = function(a) {
  for (var b = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "recents", "recents", 2096199914)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.destroy_BANG_.call(null, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.object.destroy_BANG_.call(null, b), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return lt.object.merge_BANG_.call(null, a, cljs.core.PersistentHashMap.fromArrays.call(null, [new cljs.core.Keyword(null, "recents", "recents", 2096199914)], [cljs.core.map.call(null, function(a) {
    return lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent-workspace", "lt.objs.sidebar.workspace/recent-workspace", 4144769423), a);
  }, lt.objs.workspace.all.call(null))]));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent!", "lt.objs.sidebar.workspace/recent!", 4521365004), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__recent_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "recent!", "recent!", 2096199832), null], null), null));
lt.objs.sidebar.workspace.__BEH__tree_BANG_ = function(a) {
  for (var b = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "recents", "recents", 2096199914)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e);
      lt.object.destroy_BANG_.call(null, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        c = b, cljs.core.chunked_seq_QMARK_.call(null, c) ? (b = cljs.core.chunk_first.call(null, c), e = cljs.core.chunk_rest.call(null, c), c = b, d = cljs.core.count.call(null, b), b = e) : (b = cljs.core.first.call(null, c), lt.object.destroy_BANG_.call(null, b), b = cljs.core.next.call(null, c), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "recents", "recents", 2096199914), null], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "tree!", "lt.objs.sidebar.workspace/tree!", 3018393903), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__tree_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "tree!", "tree!", 1124529077), null], null), null));
lt.objs.sidebar.workspace.__BEH__recent__DOT__select_BANG_ = function(a) {
  lt.objs.workspace.open.call(null, lt.objs.workspace.current_ws, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.raise.call(null, lt.objs.sidebar.workspace.sidebar_workspace, new cljs.core.Keyword(null, "tree!", "tree!", 1124529077));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent.select!", "lt.objs.sidebar.workspace/recent.select!", 2595077856), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__recent__DOT__select_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "select!", "select!", 2992004631), null], 
null), null));
lt.objs.sidebar.workspace.__BEH__recent__DOT__delete_BANG_ = function(a) {
  cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "file", "file", 1017047278)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, lt.objs.workspace.current_ws)), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) && lt.object.raise.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  lt.objs.files.delete_BANG_.call(null, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.raise.call(null, lt.objs.sidebar.workspace.sidebar_workspace, new cljs.core.Keyword(null, "recent!", "recent!", 2096199832));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent.delete!", "lt.objs.sidebar.workspace/recent.delete!", 959251503), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__recent__DOT__delete_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "delete!", "delete!", 2564367176), null], 
null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent-workspace", "lt.objs.sidebar.workspace/recent-workspace", 4144769423), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "recent-workspace", "recent-workspace", 2388792085), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, b);
  return lt.objs.sidebar.workspace.recents_item.call(null, a);
});
lt.objs.sidebar.workspace.ws_class = function(a) {
  return[cljs.core.str("workspace"), cljs.core.str(cljs.core.truth_((new cljs.core.Keyword(null, "recents", "recents", 2096199914)).cljs$core$IFn$_invoke$arity$1(a)) ? " recents" : null)].join("");
};
lt.objs.sidebar.workspace.workspace_ui = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.sidebar.workspace.ws_class)], null), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.wstree", "div.wstree", 2918560745), 
  new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.buttons", "ul.buttons", 666323612), lt.objs.sidebar.workspace.button.call(null, "folder", lt.objs.sidebar.workspace.open_folder), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li.sep", "li.sep", 4204306399), "|"], null), lt.objs.sidebar.workspace.button.call(null, "file", lt.objs.sidebar.workspace.open_file), new cljs.core.PersistentVector(null, 
  2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li.sep", "li.sep", 4204306399), "|"], null), lt.objs.sidebar.workspace.button.call(null, "recent", function() {
    return lt.objs.sidebar.workspace.recent.call(null, a);
  })], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul.root", "ul.root", 615589195), lt.object.__GT_content.call(null, lt.objs.sidebar.workspace.tree)], null)], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.recent", "div.recent", 2761967050), crate.binding.bound.call(null, a, function(b) {
    return lt.objs.sidebar.workspace.recents.call(null, a, (new cljs.core.Keyword(null, "recents", "recents", 2096199914)).cljs$core$IFn$_invoke$arity$1(b));
  })], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 6, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "dragover", "dragover", 4468024186), function(b) {
    b.dataTransfer.dropEffect = "move";
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "dragover", "dragover", 4468024186), b);
    lt.util.dom.prevent.call(null, b);
    return!1;
  }, new cljs.core.Keyword(null, "drop", "drop", 1016996449), function(b) {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "drop", "drop", 1016996449), b);
    lt.util.dom.stop_propagation.call(null, b);
    return lt.util.dom.prevent.call(null, b);
  }, new cljs.core.Keyword(null, "contextmenu", "contextmenu", 911789824), function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "sidebar.workspace", "lt.objs.sidebar.workspace/sidebar.workspace", 705450607), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "sidebar.workspace", "sidebar.workspace", 3781278709), null], null), null), new cljs.core.Keyword(null, "label", "label", 1116631654), "workspace", new cljs.core.Keyword(null, 
"order", "order", 1119910592), -7, new cljs.core.Keyword(null, "init", "init", 1017141378), function(a) {
  return lt.objs.sidebar.workspace.workspace_ui.call(null, a);
});
lt.objs.sidebar.workspace.__BEH__sidebar_menu = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Add folder", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.add-folder", "workspace.add-folder", 2772643205));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Add file", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.add-file", "workspace.add-file", 2669358035));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Open recent workspace", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.show-recents", "workspace.show-recents", 1806500563));
  }], null), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator"], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Clear workspace", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, lt.objs.sidebar.workspace.tree, new cljs.core.Keyword(null, "clear!", "clear!", 3951036134));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "sidebar-menu", "lt.objs.sidebar.workspace/sidebar-menu", 3021041170), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__sidebar_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), null], null), null));
lt.objs.sidebar.workspace.__BEH__recent_menu = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "label", "label", 1116631654), "Delete Workspace", new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "delete!", "delete!", 2564367176));
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "recent-menu", "lt.objs.sidebar.workspace/recent-menu", 1238711153), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__recent_menu, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu-items", "menu-items", 3782623556), null], null), null));
lt.objs.sidebar.workspace.__BEH__workspace__DOT__open_on_start = function(a) {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "workspace.open-on-start", "lt.objs.sidebar.workspace/workspace.open-on-start", 2867305284), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.sidebar.workspace.__BEH__workspace__DOT__open_on_start, new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Show workspace on start", new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, 
new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "user", "user", 1017503549));
lt.objs.sidebar.workspace.sidebar_workspace = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.sidebar.workspace", "sidebar.workspace", "lt.objs.sidebar.workspace/sidebar.workspace", 705450607));
lt.objs.sidebar.add_item.call(null, lt.objs.sidebar.sidebar, lt.objs.sidebar.workspace.sidebar_workspace);
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.add-folder", "workspace.add-folder", 2772643205), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: add folder", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.workspace.open_folder.call(null);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.add-file", "workspace.add-file", 2669358035), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: add file", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  return lt.objs.sidebar.workspace.open_file.call(null);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Toggle workspace tree", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  return lt.object.raise.call(null, lt.objs.sidebar.sidebar, new cljs.core.Keyword(null, "toggle", "toggle", 4440567494), lt.objs.sidebar.workspace.sidebar_workspace, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "transient?", "transient?", 3584270951), !1, new cljs.core.Keyword(null, "force?", "force?", 4040082982), a], null));
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.rename.cancel!", "workspace.rename.cancel!", 1179487266), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Cancel rename", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tree.rename", "tree.rename", 1095020288));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.cancel!", "rename.cancel!", 4050107817)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.rename.submit!", "workspace.rename.submit!", 3056447044), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Submit rename", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "tree.rename", "tree.rename", 1095020288));
  return cljs.core.truth_(a) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "rename.submit!", "rename.submit!", 1632100299)) : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "workspace.show-recents", "workspace.show-recents", 1806500563), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Workspace: Open recent workspace", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "workspace.show", "workspace.show", 1768599592), new cljs.core.Keyword(null, "force", "force", 1111522909));
  return lt.objs.sidebar.workspace.recent.call(null, lt.objs.sidebar.workspace.sidebar_workspace);
}], null));
lt.objs.clients.devtools = {};
lt.objs.clients.devtools.cbs = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY);
lt.objs.clients.devtools.id = cljs.core.atom.call(null, 0);
lt.objs.clients.devtools.devtools_url = "http://localhost:8315/json";
lt.objs.clients.devtools.next_id = function() {
  return cljs.core.swap_BANG_.call(null, lt.objs.clients.devtools.id, cljs.core.inc);
};
lt.objs.clients.devtools.find_debugger_info = function(a, b) {
  return cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
    var d = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(a), b);
    return d ? (new cljs.core.Keyword(null, "webSocketDebuggerUrl", "webSocketDebuggerUrl", 667502233)).cljs$core$IFn$_invoke$arity$1(a) : d;
  }, a));
};
lt.objs.clients.devtools.socket = function(a, b) {
  var c = new WebSocket(b);
  c.onopen = function() {
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connected", "connected", 4729661051), !0], null));
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "connect", "connect", 1965255772));
  };
  c.onmessage = function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "message", "message", 1968829305), cljs.core.js__GT_clj.call(null, JSON.parse(b.data), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0));
  };
  return c;
};
lt.objs.clients.devtools.send_STAR_ = function(a, b, c) {
  (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).send(JSON.stringify(cljs.core.clj__GT_js.call(null, b)));
  return cljs.core.truth_(c) ? cljs.core.swap_BANG_.call(null, lt.objs.clients.devtools.cbs, cljs.core.assoc, (new cljs.core.Keyword(null, "id", "id", 1013907597)).cljs$core$IFn$_invoke$arity$1(b), c) : null;
};
lt.objs.clients.devtools.send = function() {
  var a = function(a, b, e) {
    e = cljs.core.nth.call(null, e, 0, null);
    return cljs.core.truth_((new cljs.core.Keyword(null, "connected", "connected", 4729661051)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.objs.clients.devtools.send_STAR_.call(null, a, b, e) : lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "queue", "queue", 1121848451)], null), cljs.core.conj, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, 
    [a, b, e], null));
  }, b = function(b, d, e) {
    var f = null;
    2 < arguments.length && (f = cljs.core.array_seq(Array.prototype.slice.call(arguments, 2), 0));
    return a.call(this, b, d, f);
  };
  b.cljs$lang$maxFixedArity = 2;
  b.cljs$lang$applyTo = function(b) {
    var d = cljs.core.first(b);
    b = cljs.core.next(b);
    var e = cljs.core.first(b);
    b = cljs.core.rest(b);
    return a(d, e, b);
  };
  b.cljs$core$IFn$_invoke$arity$variadic = a;
  return b;
}();
lt.objs.clients.devtools.close = function(a) {
  (new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)).close();
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "socket", "socket", 4411822821), null, new cljs.core.Keyword(null, "connected", "connected", 4729661051), null], null));
};
lt.objs.clients.devtools.format_value = function(a) {
  var b = (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(a);
  return cljs.core._EQ_.call(null, b, "undefined") ? "undefined" : cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(a), "string") ? cljs.core.pr_str.call(null, b) : !0 === b || !1 === b ? cljs.core.pr_str.call(null, b) : null == b || cljs.core.empty_QMARK_.call(null, b) ? "null" : new cljs.core.Keyword(null, "else", "else", 1017020587) ? (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(a) : null;
};
lt.objs.clients.devtools.msg__GT_log = function(a, b) {
  var c = (new cljs.core.Keyword(null, "parameters", "parameters", 1472640348)).cljs$core$IFn$_invoke$arity$1(b);
  return function e(b) {
    return new cljs.core.LazySeq(null, function() {
      for (;;) {
        var c = cljs.core.seq.call(null, b);
        if (c) {
          if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
            var h = cljs.core.chunk_first.call(null, c), k = cljs.core.count.call(null, h), l = cljs.core.chunk_buffer.call(null, k);
            return function() {
              for (var b = 0;;) {
                if (b < k) {
                  var c = cljs.core._nth.call(null, h, b);
                  cljs.core.chunk_append.call(null, l, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.log-val", "span.log-val", 3645418982), cljs.core.truth_(function() {
                    var a = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(c), "object");
                    return a ? (a = (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c), cljs.core.truth_(a) ? cljs.core.not.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c))) : a) : a;
                  }()) ? "null" : cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(c), "object") ? lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 1125876963), c], null))) : new cljs.core.Keyword(null, 
                  "else", "else", 1017020587) ? (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$2(c, (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(c)) : null], null));
                  b += 1;
                } else {
                  return!0;
                }
              }
            }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), e.call(null, cljs.core.chunk_rest.call(null, c))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), null);
          }
          var m = cljs.core.first.call(null, c);
          return cljs.core.cons.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "span.log-val", "span.log-val", 3645418982), cljs.core.truth_(function() {
            var a = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(m), "object");
            return a ? (a = (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(m), cljs.core.truth_(a) ? cljs.core.not.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(m))) : a) : a;
          }()) ? "null" : cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(m), "object") ? lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 1125876963), m], null))) : new cljs.core.Keyword(null, "else", 
          "else", 1017020587) ? (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$2(m, (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(m)) : null], null), e.call(null, cljs.core.rest.call(null, c)));
        }
        return null;
      }
    }, null, null);
  }.call(null, c);
};
lt.objs.clients.devtools.msg__GT_string = function(a) {
  a = (new cljs.core.Keyword(null, "parameters", "parameters", 1472640348)).cljs$core$IFn$_invoke$arity$1(a);
  return cljs.core.reduce.call(null, function(a, c) {
    return[cljs.core.str(a), cljs.core.str(" "), cljs.core.str((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c))].join("");
  }, "", a);
};
lt.objs.clients.devtools.error__GT_string = function(a) {
  return[cljs.core.str("ERROR: "), cljs.core.str((new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str(": "), cljs.core.str((new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(a)), cljs.core.str("\n"), cljs.core.str(cljs.core.reduce.call(null, function(a, c) {
    return[cljs.core.str(a), cljs.core.str("       "), cljs.core.str(lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(c))), cljs.core.str(" ["), cljs.core.str((new cljs.core.Keyword(null, "lineNumber", "lineNumber", 684762063)).cljs$core$IFn$_invoke$arity$1(c)), cljs.core.str("]: "), cljs.core.str(cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "functionName", "functionName", 802531829)).cljs$core$IFn$_invoke$arity$1(c)) ? 
    "anonymous" : (new cljs.core.Keyword(null, "functionName", "functionName", 802531829)).cljs$core$IFn$_invoke$arity$1(c)), cljs.core.str("\n")].join("");
  }, "", (new cljs.core.Keyword(null, "stackTrace", "stackTrace", 3040184079)).cljs$core$IFn$_invoke$arity$1(a)))].join("");
};
lt.objs.clients.devtools.frame = function(a) {
  a = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "tr", "tr", 1013907952), new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td.url", "td.url", 4428724323), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(a)), " [", (new cljs.core.Keyword(null, "lineNumber", "lineNumber", 
  684762063)).cljs$core$IFn$_invoke$arity$1(a), "]"], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "td", "td", 1013907938), cljs.core.empty_QMARK_.call(null, (new cljs.core.Keyword(null, "functionName", "functionName", 802531829)).cljs$core$IFn$_invoke$arity$1(a)) ? "anonymous" : (new cljs.core.Keyword(null, "functionName", "functionName", 802531829)).cljs$core$IFn$_invoke$arity$1(a)], null)], null));
  for (var b = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), c = null, d = 0, e = 0;;) {
    if (e < d) {
      var f = cljs.core._nth.call(null, c, e), g = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null);
      lt.util.dom.on.call(null, a, g, f);
      e += 1;
    } else {
      if (b = cljs.core.seq.call(null, b)) {
        cljs.core.chunked_seq_QMARK_.call(null, b) ? (d = cljs.core.chunk_first.call(null, b), b = cljs.core.chunk_rest.call(null, b), c = d, d = cljs.core.count.call(null, d)) : (d = cljs.core.first.call(null, b), c = cljs.core.nth.call(null, d, 0, null), d = cljs.core.nth.call(null, d, 1, null), lt.util.dom.on.call(null, a, c, d), b = cljs.core.next.call(null, b), c = null, d = 0), e = 0;
      } else {
        break;
      }
    }
  }
  return a;
};
lt.objs.clients.devtools.handle_log_msg = function() {
  var a = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), c = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), d = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), e = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "hierarchy", "hierarchy", 3129050535), cljs.core.get_global_hierarchy.call(null));
  return new cljs.core.MultiFn("handle-log-msg", function(a, b) {
    return(new cljs.core.Keyword(null, "level", "level", 1116770038)).cljs$core$IFn$_invoke$arity$1(b);
  }, new cljs.core.Keyword(null, "default", "default", 2558708147), e, a, b, c, d);
}();
lt.objs.clients.devtools.valid_error_QMARK_ = function(a) {
  var b = a.toLowerCase();
  return cljs.core.every_QMARK_.call(null, function(a) {
    return cljs.core._EQ_.call(null, -1, b.indexOf(a));
  }, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, ["failed to load resource: http://app.kodowa.com"], null));
};
cljs.core._add_method.call(null, lt.objs.clients.devtools.handle_log_msg, "error", function(a, b) {
  if (lt.objs.clients.devtools.valid_error_QMARK_.call(null, [cljs.core.str((new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b)), cljs.core.str(": "), cljs.core.str((new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(b))].join(""))) {
    var c = cljs.core.first.call(null, (new cljs.core.Keyword(null, "stackTrace", "stackTrace", 3040184079)).cljs$core$IFn$_invoke$arity$1(b));
    return lt.objs.console.verbatim.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h3", "h3", 1013907517), (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b), cljs.core.truth_((new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(c)) ? 
    null : [cljs.core.str(": "), cljs.core.str((new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(b))].join("")], null), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "table", "table", 1124020032), function() {
      return function e(a) {
        return new cljs.core.LazySeq(null, function() {
          for (;;) {
            var b = cljs.core.seq.call(null, a);
            if (b) {
              if (cljs.core.chunked_seq_QMARK_.call(null, b)) {
                var c = cljs.core.chunk_first.call(null, b), k = cljs.core.count.call(null, c), l = cljs.core.chunk_buffer.call(null, k);
                a: {
                  for (var m = 0;;) {
                    if (m < k) {
                      var n = cljs.core._nth.call(null, c, m);
                      cljs.core.chunk_append.call(null, l, lt.objs.clients.devtools.frame.call(null, n));
                      m += 1;
                    } else {
                      c = !0;
                      break a;
                    }
                  }
                  c = void 0;
                }
                return c ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), e.call(null, cljs.core.chunk_rest.call(null, b))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, l), null);
              }
              l = cljs.core.first.call(null, b);
              return cljs.core.cons.call(null, lt.objs.clients.devtools.frame.call(null, l), e.call(null, cljs.core.rest.call(null, b)));
            }
            return null;
          }
        }, null, null);
      }.call(null, (new cljs.core.Keyword(null, "stackTrace", "stackTrace", 3040184079)).cljs$core$IFn$_invoke$arity$1(b));
    }()], null)], null), "error", lt.objs.clients.devtools.error__GT_string.call(null, b));
  }
  return null;
});
cljs.core._add_method.call(null, lt.objs.clients.devtools.handle_log_msg, "log", function(a, b) {
  var c = cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
    return cljs.core.not_EQ_.call(null, lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(a)), "bootstrap.js");
  }, (new cljs.core.Keyword(null, "stackTrace", "stackTrace", 3040184079)).cljs$core$IFn$_invoke$arity$1(b))), c = cljs.core.not.call(null, c) ? cljs.core.first.call(null, (new cljs.core.Keyword(null, "stackTrace", "stackTrace", 3040184079)).cljs$core$IFn$_invoke$arity$1(b)) : c;
  return lt.objs.console.loc_log.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(c)), new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "lineNumber", "lineNumber", 684762063)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "content", "content", 1965434859), lt.objs.clients.devtools.msg__GT_log.call(null, 
  a, b), new cljs.core.Keyword(null, "str-content", "str-content", 1379403855), lt.objs.clients.devtools.msg__GT_string.call(null, b)], null));
});
cljs.core._add_method.call(null, lt.objs.clients.devtools.handle_log_msg, "warning", function(a, b) {
  return lt.objs.console.loc_log.call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(b)), new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "class", "class", 1108647146), "warning", new cljs.core.Keyword(null, 
  "content", "content", 1965434859), (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "str-content", "str-content", 1379403855), (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b)], null));
});
cljs.core._add_method.call(null, lt.objs.clients.devtools.handle_log_msg, new cljs.core.Keyword(null, "default", "default", 2558708147), function(a, b) {
  return lt.objs.console.loc_log.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "file", "file", 1017047278), lt.objs.files.basename.call(null, (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(b)), new cljs.core.Keyword(null, "line", "line", 1017226086), (new cljs.core.Keyword(null, "line", "line", 1017226086)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "content", "content", 1965434859), (new cljs.core.Keyword(null, 
  "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "str-content", "str-content", 1379403855), (new cljs.core.Keyword(null, "text", "text", 1017460895)).cljs$core$IFn$_invoke$arity$1(b)], null));
});
lt.objs.clients.devtools.extra_escape = function(a) {
  return clojure.string.replace.call(null, clojure.string.replace.call(null, clojure.string.replace.call(null, a, "\\", "\\\\"), "\n", "\\n"), "'", "\\'");
};
lt.objs.clients.devtools.eval_in_webview_client = function(a, b, c) {
  return lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Runtime.evaluate", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "expression", "expression", 3513419274), (new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(b)], 
  null)], null), c);
};
lt.objs.clients.devtools.clear_scripts_BANG_ = function(a) {
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "scripts", "scripts", 2940419194), cljs.core.PersistentArrayMap.EMPTY], null));
};
lt.objs.clients.devtools.find_script = function(a, b) {
  return cljs.core.get.call(null, cljs.core.deref.call(null, a).call(null, new cljs.core.Keyword(null, "scripts", "scripts", 2940419194)), lt.objs.files.basename.call(null, b));
};
lt.objs.clients.devtools.script_exists_QMARK_ = function(a, b, c) {
  return lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Debugger.canSetScriptSource", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "scriptId", "scriptId", 606324408), b], null)], null), function(a) {
    return c.call(null, (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(a)));
  });
};
lt.objs.clients.devtools.remove_script_BANG_ = function(a, b, c) {
  var d = cljs.core.first.call(null, cljs.core.filter.call(null, function(a) {
    return cljs.core._EQ_.call(null, c, (new cljs.core.Keyword(null, "scriptId", "scriptId", 606324408)).cljs$core$IFn$_invoke$arity$1(cljs.core.second.call(null, a)));
  }, lt.objs.clients.devtools.find_script.call(null, a, b))), e = cljs.core.nth.call(null, d, 0, null);
  cljs.core.nth.call(null, d, 1, null);
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "scripts", "scripts", 2940419194), lt.objs.files.basename.call(null, b)], null), cljs.core.dissoc, e);
};
lt.objs.clients.devtools.changelive_BANG_ = function changelive_BANG_(b, c, d, e, f) {
  var g = lt.objs.clients.devtools.find_script.call(null, b, c);
  if (cljs.core.truth_(g)) {
    var h = (new cljs.core.Keyword(null, "scriptId", "scriptId", 606324408)).cljs$core$IFn$_invoke$arity$1(cljs.core.first.call(null, cljs.core.vals.call(null, g)));
    return lt.objs.clients.devtools.script_exists_QMARK_.call(null, b, h, function(f) {
      if (cljs.core.not.call(null, f)) {
        return lt.objs.clients.devtools.remove_script_BANG_.call(null, b, c, h), changelive_BANG_.call(null, b, c, d, e);
      }
      lt.object.merge_BANG_.call(null, b, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "script-id", "script-id", 1263804623), h], null));
      return lt.objs.clients.devtools.send.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Debugger.setScriptSource", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "scriptId", "scriptId", 606324408), h, new cljs.core.Keyword(null, "scriptSource", 
      "scriptSource", 3711898680), d], null)], null), e);
    });
  }
  return f.call(null);
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "devtools-client", "lt.objs.clients.devtools/devtools-client", 2732459658), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clients.devtools", "clients.devtools", 2282697598), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "url", "url", 1014020321), b], null));
  return null;
});
lt.objs.clients.devtools.local = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "devtools-client", "lt.objs.clients.devtools/devtools-client", 2732459658), lt.objs.app.app_url.call(null));
lt.util.ipc.on.call(null, "devtools", function(a) {
  return lt.object.raise.call(null, lt.objs.clients.devtools.local, cljs.core.keyword.call(null, a));
});
lt.objs.clients.devtools.__BEH__connect_BANG_ = function(a, b) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "socket", "socket", 4411822821), lt.objs.clients.devtools.socket.call(null, a, b)], null));
  lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Console.enable"], null));
  lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Debugger.enable"], null));
  return lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Network.setCacheDisabled", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "cacheDisabled", "cacheDisabled", 3367083920), !0], null)], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "connect!", "lt.objs.clients.devtools/connect!", 4727522991), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__connect_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect!", "connect!", 4735997929), null], null), null));
lt.objs.clients.devtools.__BEH__clear_queue_on_connect = function(a) {
  a = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "queue", "queue", 1121848451)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  for (var b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      cljs.core.apply.call(null, lt.objs.clients.devtools.send, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), cljs.core.apply.call(null, lt.objs.clients.devtools.send, e), a = cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "clear-queue-on-connect", "lt.objs.clients.devtools/clear-queue-on-connect", 2202730096), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__clear_queue_on_connect, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "connect", "connect", 1965255772), 
null], null), null));
lt.objs.clients.devtools.__BEH__print_messages = function(a, b) {
  return null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "print-messages", "lt.objs.clients.devtools/print-messages", 675571380), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__print_messages, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "message", "message", 1968829305), null], null), null));
lt.objs.clients.devtools.__BEH__handle_message = function(a, b) {
  var c = cljs.core.deref.call(null, lt.objs.clients.devtools.cbs).call(null, (new cljs.core.Keyword(null, "id", "id", 1013907597)).cljs$core$IFn$_invoke$arity$1(b));
  return cljs.core.truth_(c) ? (c.call(null, b), cljs.core.swap_BANG_.call(null, lt.objs.clients.devtools.cbs, cljs.core.dissoc, (new cljs.core.Keyword(null, "id", "id", 1013907597)).cljs$core$IFn$_invoke$arity$1(b))) : cljs.core.truth_((new cljs.core.Keyword(null, "method", "method", 4231316563)).cljs$core$IFn$_invoke$arity$1(b)) ? lt.object.raise.call(null, a, cljs.core.keyword.call(null, (new cljs.core.Keyword(null, "method", "method", 4231316563)).cljs$core$IFn$_invoke$arity$1(b)), b) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "handle-message", "lt.objs.clients.devtools/handle-message", 1428636858), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__handle_message, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "message", "message", 1968829305), null], null), null));
lt.objs.clients.devtools.__BEH__script_parsed = function(a, b) {
  var c = (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(b));
  return lt.object.update_BANG_.call(null, a, new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "scripts", "scripts", 2940419194)], null), cljs.core.assoc_in, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [lt.objs.files.basename.call(null, c), c], null), (new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "script-parsed", "lt.objs.clients.devtools/script-parsed", 1407217355), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__script_parsed, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "Debugger.scriptParsed", "Debugger.scriptParsed", 1050864827), 
null], null), null));
lt.objs.clients.devtools.__BEH__console_log = function(a, b) {
  var c = (new cljs.core.Keyword(null, "message", "message", 1968829305)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "params", "params", 4313443576)).cljs$core$IFn$_invoke$arity$1(b));
  return lt.objs.clients.devtools.handle_log_msg.call(null, a, c);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "console-log", "lt.objs.clients.devtools/console-log", 1720612182), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__console_log, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "Console.messageAdded", "Console.messageAdded", 4767739906), null], 
null), null));
lt.objs.clients.devtools.__BEH__clear_console = function(a) {
  return lt.objs.clients.devtools.send.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Console.clearMessages"], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "clear-console", "lt.objs.clients.devtools/clear-console", 2897345871), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__clear_console, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "clear!", "clear!", 3951036134), null], null), null));
lt.objs.clients.devtools.__BEH__disconnect = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "socket", "socket", 4411822821)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? lt.objs.clients.devtools.close.call(null, a) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "disconnect", "lt.objs.clients.devtools/disconnect", 3633156740), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__disconnect, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "disconnect", "disconnect", 1544309774), null], null), null));
lt.objs.clients.devtools.__BEH__reconnect = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "disconnect", "disconnect", 1544309774));
  return fetch.core.xhr.call(null, lt.objs.clients.devtools.devtools_url, cljs.core.PersistentArrayMap.EMPTY, function(b) {
    b = (new cljs.core.Keyword(null, "webSocketDebuggerUrl", "webSocketDebuggerUrl", 667502233)).cljs$core$IFn$_invoke$arity$1(lt.objs.clients.devtools.find_debugger_info.call(null, cljs.core.js__GT_clj.call(null, JSON.parse(b), new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0), (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
    return cljs.core.truth_(b) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "connect!", "connect!", 4735997929), b) : lt.util.js.wait.call(null, 1E3, function() {
      return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "reconnect!", "reconnect!", 1644020508));
    });
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "reconnect", "lt.objs.clients.devtools/reconnect", 3171303119), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__reconnect, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "reconnect!", "reconnect!", 1644020508), null], null), null));
lt.objs.clients.devtools.__BEH__connect_on_init = function(a) {
  return lt.object.raise.call(null, lt.objs.clients.devtools.local, new cljs.core.Keyword(null, "reconnect!", "reconnect!", 1644020508));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "connect-on-init", "lt.objs.clients.devtools/connect-on-init", 605011907), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__connect_on_init, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.clients.devtools.i_compare = function(a, b) {
  var c = a.indexOf("__"), d = b.indexOf("__");
  return cljs.core._EQ_.call(null, c, -1) && cljs.core._EQ_.call(null, d, -1) ? cljs.core.compare.call(null, a, b) : -1 < c && -1 < d ? cljs.core.compare.call(null, a, b) : -1 < c ? 1 : new cljs.core.Keyword(null, "else", "else", 1017020587) ? -1 : null;
};
lt.objs.clients.devtools.__GT_name = function(a) {
  var b = function() {
    var b = (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(a);
    if (cljs.core.truth_(b)) {
      return b;
    }
    b = (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(a));
    if (cljs.core.truth_(b)) {
      return b;
    }
    b = (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1(a);
    return cljs.core.truth_(b) ? b : "UnknownObject";
  }();
  return-1 < b.indexOf("e.fn.e.init") ? [cljs.core.str("jQuery"), cljs.core.str(cljs.core.subs.call(null, b, 11))].join("") : new cljs.core.Keyword(null, "else", "else", 1017020587) ? b : null;
};
lt.objs.clients.devtools.desc = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "h2", "h2", 1013907516), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "em", "em", 1013907482), lt.objs.clients.devtools.__GT_name.call(null, b)], null), cljs.core.truth_((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(b)) ? [cljs.core.str(": "), 
  cljs.core.str((new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(b)))].join("") : null], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", "click", 1108654330), function() {
    if (cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)))) {
      return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !1], null));
    }
    lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "open", "open", 1017321916), !0], null));
    return cljs.core.seq.call(null, (new cljs.core.Keyword(null, "children", "children", 2673430897)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))) ? null : lt.objs.clients.devtools.send.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), 1, new cljs.core.Keyword(null, "method", "method", 4231316563), "Runtime.getProperties", 
    new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "objectId", "objectId", 1104399404), function() {
      var a = (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(b));
      return cljs.core.truth_(a) ? a : (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1(b);
    }(), new cljs.core.Keyword(null, "ownProperties", "ownProperties", 1958141131), !0], null)], null), function(b) {
      return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "children", "children", 2673430897), (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(b))], null));
    });
  }], null))), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.clients.devtools.props = function(a, b) {
  for (var c = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "ul", "ul", 1013907977), function() {
    return function m(b) {
      return new cljs.core.LazySeq(null, function() {
        for (;;) {
          var c = cljs.core.seq.call(null, b);
          if (c) {
            if (cljs.core.chunked_seq_QMARK_.call(null, c)) {
              var d = cljs.core.chunk_first.call(null, c), e = cljs.core.count.call(null, d), f = cljs.core.chunk_buffer.call(null, e);
              return function() {
                for (var b = 0;;) {
                  if (b < e) {
                    var c = cljs.core._nth.call(null, d, b);
                    cljs.core.chunk_append.call(null, f, cljs.core.truth_(function() {
                      var a = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c)), "object");
                      return a ? (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c)) : a;
                    }()) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), c))], null) : new cljs.core.PersistentVector(null, 
                    4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "em", "em", 1013907482), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c)], null), ": ", function() {
                      var a = (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c));
                      return cljs.core.truth_(a) ? a : "" + cljs.core.str(lt.objs.clients.devtools.format_value.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(c)));
                    }()], null));
                    b += 1;
                  } else {
                    return!0;
                  }
                }
              }() ? cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), m.call(null, cljs.core.chunk_rest.call(null, c))) : cljs.core.chunk_cons.call(null, cljs.core.chunk.call(null, f), null);
            }
            var g = cljs.core.first.call(null, c);
            return cljs.core.cons.call(null, cljs.core.truth_(function() {
              var a = cljs.core._EQ_.call(null, (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(g)), "object");
              return a ? (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(g)) : a;
            }()) ? new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), g))], null) : new cljs.core.PersistentVector(null, 
            4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "li", "li", 1013907695), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "em", "em", 1013907482), (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(g)], null), ": ", function() {
              var a = (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(g));
              return cljs.core.truth_(a) ? a : "" + cljs.core.str(lt.objs.clients.devtools.format_value.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(g)));
            }()], null), m.call(null, cljs.core.rest.call(null, c)));
          }
          return null;
        }
      }, null, null);
    }.call(null, cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.clients.devtools.i_compare, b));
  }()], null)), d = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, cljs.core.PersistentVector.EMPTY)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      var h = cljs.core._nth.call(null, e, g), k = cljs.core.nth.call(null, h, 0, null), h = cljs.core.nth.call(null, h, 1, null);
      lt.util.dom.on.call(null, c, k, h);
      g += 1;
    } else {
      if (d = cljs.core.seq.call(null, d)) {
        cljs.core.chunked_seq_QMARK_.call(null, d) ? (f = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), e = f, f = cljs.core.count.call(null, f)) : (f = cljs.core.first.call(null, d), e = cljs.core.nth.call(null, f, 0, null), f = cljs.core.nth.call(null, f, 1, null), lt.util.dom.on.call(null, c, e, f), d = cljs.core.next.call(null, d), e = null, f = 0), g = 0;
      } else {
        break;
      }
    }
  }
  return c;
};
lt.objs.clients.devtools.__GT_open = function(a) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "open", "open", 1017321916)).cljs$core$IFn$_invoke$arity$1(a)) ? "inspector-object open" : "inspector-object";
};
lt.objs.clients.devtools.inspector__GT_result = function(a, b) {
  var c = (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(b), d = (new cljs.core.Keyword(null, "result", "result", 4374444943)).cljs$core$IFn$_invoke$arity$1(c);
  if (cljs.core.truth_((new cljs.core.Keyword(null, "wasThrown", "wasThrown", 3712175619)).cljs$core$IFn$_invoke$arity$1(c))) {
    d = new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "ex", "ex", 1013907493), (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1(d)], null);
  } else {
    var c = cljs.core.PersistentArrayMap, e = new cljs.core.Keyword(null, "result", "result", 4374444943);
    var f = cljs.core._EQ_, g = (new cljs.core.Keyword(null, "type", "type", 1017479852)).cljs$core$IFn$_invoke$arity$1(d);
    cljs.core.truth_(f.call(null, "object", g)) ? d = lt.object.__GT_content.call(null, lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), a, d)) : (f = (new cljs.core.Keyword(null, "description", "description", 3584325486)).cljs$core$IFn$_invoke$arity$1(d), d = cljs.core.truth_(f) ? f : cljs.core.pr_str.call(null, (new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1(d)));
    d = new c(null, 1, [e, d], null);
  }
  return d;
};
lt.objs.clients.devtools.clear_unused_inspectors = function() {
  for (var a = cljs.core.seq.call(null, lt.object.by_tag.call(null, new cljs.core.Keyword(null, "inspector.object", "inspector.object", 1285492104))), b = null, c = 0, d = 0;;) {
    if (d < c) {
      var e = cljs.core._nth.call(null, b, d);
      (cljs.core.not.call(null, lt.object.__GT_content.call(null, e)) || cljs.core.not.call(null, lt.util.dom.parents.call(null, lt.object.__GT_content.call(null, e), new cljs.core.Keyword(null, "body", "body", 1016933652)))) && lt.object.destroy_BANG_.call(null, e);
      d += 1;
    } else {
      if (a = cljs.core.seq.call(null, a)) {
        b = a, cljs.core.chunked_seq_QMARK_.call(null, b) ? (a = cljs.core.chunk_first.call(null, b), c = cljs.core.chunk_rest.call(null, b), b = a, e = cljs.core.count.call(null, a), a = c, c = e) : (e = cljs.core.first.call(null, b), (cljs.core.not.call(null, lt.object.__GT_content.call(null, e)) || cljs.core.not.call(null, lt.util.dom.parents.call(null, lt.object.__GT_content.call(null, e), new cljs.core.Keyword(null, "body", "body", 1016933652)))) && lt.object.destroy_BANG_.call(null, e), a = 
        cljs.core.next.call(null, b), b = null, c = 0), d = 0;
      } else {
        return null;
      }
    }
  }
};
lt.objs.clients.devtools.__BEH__clean_inspectors_timer = function(a) {
  return lt.util.js.every.call(null, 6E4, lt.objs.clients.devtools.clear_unused_inspectors);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "clean-inspectors-timer", "lt.objs.clients.devtools/clean-inspectors-timer", 3384727952), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__clean_inspectors_timer, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], 
null), null));
lt.objs.clients.devtools.__BEH__clear_inspector_object = function(a) {
  var b;
  b = (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "value", "value", 1125876963)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
  b = cljs.core.truth_(b) ? b : (new cljs.core.Keyword(null, "objectId", "objectId", 1104399404)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return cljs.core.truth_(b) ? lt.objs.clients.devtools.send.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.clients.devtools.next_id.call(null), new cljs.core.Keyword(null, "method", "method", 4231316563), "Runtime.releaseObject", new cljs.core.Keyword(null, "params", "params", 4313443576), new cljs.core.PersistentArrayMap(null, 
  1, [new cljs.core.Keyword(null, "objectId", "objectId", 1104399404), b], null)], null)) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "clear-inspector-object", "lt.objs.clients.devtools/clear-inspector-object", 3133205453), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.devtools.__BEH__clear_inspector_object, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), 
null], null), null));
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "inspector-object", "lt.objs.clients.devtools/inspector-object", 4768596045), new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "inspector.object", "inspector.object", 1285492104), null], null), null), new cljs.core.Keyword(null, "init", "init", 1017141378), function(a, b, c) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "client", "client", 3951159101), b, new cljs.core.Keyword(null, "info", "info", 1017141280), c], null));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 1014003715), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "class", "class", 1108647146), crate.binding.bound.call(null, a, lt.objs.clients.devtools.__GT_open)], null), lt.objs.clients.devtools.desc.call(null, a, c), new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div", "div", 
  1014003715), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "children", "children", 2673430897)), cljs.core.partial.call(null, lt.objs.clients.devtools.props, a))], null)], null);
});
lt.objs.clients.local = {};
lt.objs.clients.local.client_name = "LightTable-UI";
lt.objs.clients.local.on_message = function() {
  var a = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), b = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), c = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), d = cljs.core.atom.call(null, cljs.core.PersistentArrayMap.EMPTY), e = cljs.core.get.call(null, cljs.core.PersistentArrayMap.EMPTY, new cljs.core.Keyword(null, "hierarchy", "hierarchy", 3129050535), cljs.core.get_global_hierarchy.call(null));
  return new cljs.core.MultiFn("on-message", cljs.core.identity, new cljs.core.Keyword(null, "default", "default", 2558708147), e, a, b, c, d);
}();
cljs.core._add_method.call(null, lt.objs.clients.local.on_message, new cljs.core.Keyword(null, "editor.eval.cljs.exec", "editor.eval.cljs.exec", 866638030), function(a, b, c) {
  for (var d = cljs.core.seq.call(null, (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(b)), e = null, f = 0, g = 0;;) {
    if (g < f) {
      a = cljs.core._nth.call(null, e, g);
      var h = (new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(a);
      try {
        lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.cljs.result", "editor.eval.cljs.result", 1580065178), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "result", "result", 4374444943), lt.objs.eval.cljs_result_format.call(null, eval.call(window, h)), new cljs.core.Keyword(null, 
        "meta", "meta", 1017252215), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(a))], null)], null));
      } catch (k) {
        h = k, lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.cljs.exception", "editor.eval.cljs.exception", 4479049174), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "ex", "ex", 1013907493), h, new cljs.core.Keyword(null, "meta", "meta", 1017252215), (new cljs.core.Keyword(null, 
        "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(a)], null)], null));
      }
      g += 1;
    } else {
      if (a = cljs.core.seq.call(null, d)) {
        d = a;
        if (cljs.core.chunked_seq_QMARK_.call(null, d)) {
          e = cljs.core.chunk_first.call(null, d), d = cljs.core.chunk_rest.call(null, d), a = e, f = cljs.core.count.call(null, e), e = a;
        } else {
          a = cljs.core.first.call(null, d);
          e = (new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(a);
          try {
            lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.cljs.result", "editor.eval.cljs.result", 1580065178), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "result", "result", 4374444943), lt.objs.eval.cljs_result_format.call(null, eval.call(window, e)), new cljs.core.Keyword(null, 
            "meta", "meta", 1017252215), cljs.core.merge.call(null, (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(a))], null)], null));
          } catch (l) {
            e = l, lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.cljs.exception", "editor.eval.cljs.exception", 4479049174), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "ex", "ex", 1013907493), e, new cljs.core.Keyword(null, "meta", "meta", 1017252215), (new cljs.core.Keyword(null, 
            "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(a)], null)], null));
          }
          d = cljs.core.next.call(null, d);
          e = null;
          f = 0;
        }
        g = 0;
      } else {
        return null;
      }
    }
  }
});
cljs.core._add_method.call(null, lt.objs.clients.local.on_message, new cljs.core.Keyword(null, "editor.eval.js", "editor.eval.js", 1847417804), function(a, b, c) {
  a = lt.objs.eval.append_source_file.call(null, (new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(b));
  try {
    return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.js.result", "editor.eval.js.result", 3021062051), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "result", "result", 4374444943), eval.call(window, a), new cljs.core.Keyword(null, "meta", "meta", 1017252215), (new cljs.core.Keyword(null, 
    "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(b)], null)], null));
  } catch (d) {
    return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [c, new cljs.core.Keyword(null, "editor.eval.js.exception", "editor.eval.js.exception", 723801901), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "ex", "ex", 1013907493), d, new cljs.core.Keyword(null, "meta", "meta", 1017252215), (new cljs.core.Keyword(null, "meta", 
    "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(b)], null)], null));
  }
});
cljs.core._add_method.call(null, lt.objs.clients.local.on_message, new cljs.core.Keyword(null, "editor.eval.css", "editor.eval.css", 1083014276), function(a, b, c) {
  a = [cljs.core.str("local-"), cljs.core.str(clojure.string.replace.call(null, (new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(b), /[^a-zA-Z0-9]+/, "-"))].join("");
  c = lt.util.dom.$.call(null, [cljs.core.str("#"), cljs.core.str(a)].join(""));
  cljs.core.truth_(c) && lt.util.dom.remove.call(null, c);
  return lt.util.dom.append.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "head", "head", 1017102674)), crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "style", "style", 1123684643), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text/css", new cljs.core.Keyword(null, "id", "id", 1013907597), a], null), (new cljs.core.Keyword(null, "code", 
  "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(b)], null)));
});
cljs.core._add_method.call(null, lt.objs.clients.local.on_message, new cljs.core.Keyword(null, "client.close", "client.close", 2801102215), function(a, b, c) {
  return lt.objs.clients.rem_BANG_.call(null, lt.objs.clients.by_name.call(null, lt.objs.clients.local.client_name));
});
cljs.core._add_method.call(null, lt.objs.clients.local.on_message, new cljs.core.Keyword(null, "default", "default", 2558708147), function() {
  return null;
});
lt.objs.clients.local.__BEH__send_BANG_ = function(a, b) {
  return lt.objs.clients.local.on_message.call(null, cljs.core.keyword.call(null, (new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(b)), (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b), (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.clients.local", "send!", "lt.objs.clients.local/send!", 3140293818), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.clients.local.__BEH__send_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "send!", "send!", 1123226891), null], null), null));
lt.objs.clients.local.init = function() {
  return lt.objs.clients.handle_connection_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 5, [new cljs.core.Keyword(null, "name", "name", 1017277949), lt.objs.clients.local.client_name, new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "client.local", "client.local", 2809491194)], null), new cljs.core.Keyword(null, "root-relative", "root-relative", 4164603593), lt.objs.files.lt_home.call(null, 
  "core"), new cljs.core.Keyword(null, "commands", "commands", 4706336250), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "editor.eval.cljs.exec", "editor.eval.cljs.exec", 866638030), null, new cljs.core.Keyword(null, "editor.eval.css", "editor.eval.css", 1083014276), null, new cljs.core.Keyword(null, "editor.eval.js", "editor.eval.js", 1847417804), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), "LT-UI"], 
  null));
};
lt.objs.sidebar.clients.add_connector.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "name", "name", 1017277949), "Light Table UI", new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Connect to this instance of Light Table and evaluate in the local context.", new cljs.core.Keyword(null, "connect", "connect", 1965255772), function() {
  return cljs.core.truth_(lt.objs.clients.by_name.call(null, lt.objs.clients.local.client_name)) ? null : lt.objs.clients.local.init.call(null);
}], null));
lt.objs.browser = {};
lt.objs.browser.utils = function() {
  return{};
}();
lttools = lt.objs.browser.utils;
lt.objs.browser.check_http = function(a) {
  return cljs.core._EQ_.call(null, a.indexOf("http"), -1) && cljs.core._EQ_.call(null, a.indexOf("file://"), -1) ? [cljs.core.str("http://"), cljs.core.str(a)].join("") : a;
};
lt.objs.browser.add_util = function(a, b) {
  return lt.objs.browser.utils[cljs.core.name.call(null, a)] = b;
};
lt.objs.browser.browser_id = function(a) {
  return[cljs.core.str("browser"), cljs.core.str(lt.object.__GT_id.call(null, a))].join("");
};
lt.objs.browser.to_frame = function(a) {
  return lt.util.dom.$.call(null, new cljs.core.Keyword(null, "webview", "webview", 2238328683), lt.object.__GT_content.call(null, a));
};
lt.objs.browser.client__GT_devtools = function(a) {
  return(new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, (new cljs.core.Keyword(null, "frame", "frame", 1111596255)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))));
};
lt.objs.browser.handle_cb = function(a, b, c) {
  return lt.object.raise.call(null, lt.objs.clients.clients, new cljs.core.Keyword(null, "message", "message", 1968829305), new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [a, b, c], null));
};
lt.objs.browser.connect_client = function(a) {
  return lt.objs.clients.handle_connection_BANG_.call(null, new cljs.core.PersistentArrayMap(null, 6, [new cljs.core.Keyword(null, "name", "name", 1017277949), (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "frame", "frame", 1111596255), a, new cljs.core.Keyword(null, "frame-id", "frame-id", 3663850733), lt.objs.browser.browser_id.call(null, a), new cljs.core.Keyword(null, "tags", "tags", 1017456523), 
  new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "frame.client", "frame.client", 2018369246)], null), new cljs.core.Keyword(null, "commands", "commands", 4706336250), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "editor.eval.cljs.exec", "editor.eval.cljs.exec", 866638030), null, new cljs.core.Keyword(null, "editor.eval.css", "editor.eval.css", 1083014276), null, new cljs.core.Keyword(null, 
  "editor.eval.js", "editor.eval.js", 1847417804), null, new cljs.core.Keyword(null, "editor.eval.html", "editor.eval.html", 3156465134), null], null), null), new cljs.core.Keyword(null, "type", "type", 1017479852), new cljs.core.Keyword(null, "frame", "frame", 1111596255)], null));
};
lt.objs.browser.add = function() {
  var a = lt.object.create.call(null, new cljs.core.Keyword("lt.objs.browser", "browser", "lt.objs.browser/browser", 1401265285));
  lt.objs.tabs.add_BANG_.call(null, a);
  lt.objs.tabs.active_BANG_.call(null, a);
  return a;
};
lt.objs.browser.url_bar = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "input.url-bar", "input.url-bar", 4150417411), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "type", "type", 1017479852), "text", new cljs.core.Keyword(null, "placeholder", "placeholder", 1612151013), "url", new cljs.core.Keyword(null, "value", "value", 1125876963), crate.binding.bound.call(null, a, new cljs.core.Keyword(null, 
  "url", "url", 1014020321))], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "browser.url-bar", "browser.url-bar", 537128289), a);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
    return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "browser.url-bar", "browser.url-bar", 537128289));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.browser.backward = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 1125876963), "\x3c"], null), "\x3c"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", 
  "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "back!", "back!", 1107397516));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.browser.forward = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 1125876963), "\x3e"], null), "\x3e"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", 
  "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "forward!", "forward!", 1497217390));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.browser.refresh = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 3, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "button", "button", 3931183780), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "value", "value", 1125876963), "re"], null), "\u21ba"], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "click", 
  "click", 1108654330), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.objs.browser.webview = function(a) {
  for (var b = crate.core.html.call(null, new cljs.core.PersistentVector(null, 2, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "webview", "webview", 2238328683), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "src", "src", 1014018390), crate.binding.bound.call(null, crate.binding.subatom.call(null, a, new cljs.core.Keyword(null, "url", "url", 1014020321))), new cljs.core.Keyword(null, "id", "id", 1013907597), lt.objs.browser.browser_id.call(null, 
  a), new cljs.core.Keyword(null, "preload", "preload", 695427451), lt.objs.files.lt_home.call(null, "core/node_modules/lighttable/browserInjection.js")], null)], null)), c = cljs.core.seq.call(null, cljs.core.partition.call(null, 2, new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "focus", "focus", 1111509066), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "active", "active", 3885920888));
  }, new cljs.core.Keyword(null, "blur", "blur", 1016931289), function() {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  }], null))), d = null, e = 0, f = 0;;) {
    if (f < e) {
      var g = cljs.core._nth.call(null, d, f), h = cljs.core.nth.call(null, g, 0, null), g = cljs.core.nth.call(null, g, 1, null);
      lt.util.dom.on.call(null, b, h, g);
      f += 1;
    } else {
      if (c = cljs.core.seq.call(null, c)) {
        cljs.core.chunked_seq_QMARK_.call(null, c) ? (e = cljs.core.chunk_first.call(null, c), c = cljs.core.chunk_rest.call(null, c), d = e, e = cljs.core.count.call(null, e)) : (e = cljs.core.first.call(null, c), d = cljs.core.nth.call(null, e, 0, null), e = cljs.core.nth.call(null, e, 1, null), lt.util.dom.on.call(null, b, d, e), c = cljs.core.next.call(null, c), d = null, e = 0), f = 0;
      } else {
        break;
      }
    }
  }
  return b;
};
lt.object.object_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "browser", "lt.objs.browser/browser", 1401265285), new cljs.core.Keyword(null, "name", "name", 1017277949), "browser", new cljs.core.Keyword(null, "tags", "tags", 1017456523), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "browser", "browser", 1164844698), null], null), null), new cljs.core.Keyword(null, "url", "url", 1014020321), "about:blank", new cljs.core.Keyword(null, 
"init", "init", 1017141378), function(a) {
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "client", "client", 3951159101), lt.objs.browser.connect_client.call(null, a), new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228), lt.object.create.call(null, new cljs.core.Keyword("lt.objs.clients.devtools", "devtools-client", "lt.objs.clients.devtools/devtools-client", 2732459658), (new cljs.core.Keyword(null, "url", "url", 1014020321)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, 
  a)))], null));
  lt.object.raise.call(null, (new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "reconnect!", "reconnect!", 1644020508));
  return new cljs.core.PersistentVector(null, 4, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div#browser", "div#browser", 741844136), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "div.frame-shade", "div.frame-shade", 4348666722)], null), lt.objs.browser.webview.call(null, a), new cljs.core.PersistentVector(null, 5, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "nav", "nav", 1014013077), 
  lt.objs.browser.backward.call(null, a), lt.objs.browser.forward.call(null, a), lt.objs.browser.url_bar.call(null, a), lt.objs.browser.refresh.call(null, a)], null)], null);
});
lt.objs.browser.__BEH__reconnect_on_move = function(a) {
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "reconnect!", "reconnect!", 1644020508));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "reconnect-on-move", "lt.objs.browser/reconnect-on-move", 2151189542), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__reconnect_on_move, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "move", "move", 1017261891), null], null), null));
lt.objs.browser.__BEH__destroy_on_close = function(a) {
  lt.object.raise.call(null, a, new cljs.core.Keyword(null, "inactive", "inactive", 1038569437));
  lt.object.destroy_BANG_.call(null, (new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
  return lt.object.destroy_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "destroy-on-close", "lt.objs.browser/destroy-on-close", 2232797874), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__destroy_on_close, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "close", "close", 1108660586), null], null), null));
lt.objs.browser.__BEH__rem_client = function(a) {
  cljs.core._EQ_.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959)), a) && lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959));
  var b = cljs.core.first.call(null, cljs.core.remove.call(null, cljs.core.PersistentHashSet.fromArray([a], !0), lt.object.by_tag.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698))));
  cljs.core.truth_(b) && lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959), b);
  return lt.objs.clients.rem_BANG_.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "rem-client", "lt.objs.browser/rem-client", 3433438675), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__rem_client, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "destroy", "destroy", 2571277164), null], null), null));
lt.objs.browser.__BEH__navigate_BANG_ = function(a, b) {
  var c = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)), c = lt.objs.browser.check_http.call(null, cljs.core.truth_(b) ? b : lt.util.dom.val.call(null, c));
  lt.objs.notifos.working.call(null);
  return lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "url", "url", 1014020321), c, new cljs.core.Keyword(null, "loading-counter", "loading-counter", 2714046941), (new cljs.core.Keyword(null, "loading-counter", "loading-counter", 2714046941)).cljs$core$IFn$_invoke$arity$2(cljs.core.deref.call(null, a), 0) + 1], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "navigate!", "lt.objs.browser/navigate!", 803576413), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__navigate_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "navigate!", "navigate!", 1766726722), null], null), null));
lt.objs.browser.__BEH__url_focus_BANG_ = function(a) {
  a = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  lt.util.dom.focus.call(null, a);
  return a.select();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "url-focus!", "lt.objs.browser/url-focus!", 3402432972), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__url_focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "url.focus!", "url.focus!", 4046450458), null], null), null));
lt.objs.browser.__BEH__focus_BANG_ = function(a) {
  return lt.util.dom.focus.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "webview", "webview", 2238328683), lt.object.__GT_content.call(null, a)));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "focus!", "lt.objs.browser/focus!", 3058401254), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__focus_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "focus!", "focus!", 4039653819), null], null), null));
lt.objs.browser.__BEH__back_BANG_ = function(a) {
  return lt.objs.browser.to_frame.call(null, a).goBack();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "back!", "lt.objs.browser/back!", 1427460503), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__back_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "back!", "back!", 1107397516), null], null), null));
lt.objs.browser.__BEH__forward_BANG_ = function(a) {
  return lt.objs.browser.to_frame.call(null, a).goForward();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "forward!", "lt.objs.browser/forward!", 533790641), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__forward_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "forward!", "forward!", 1497217390), null], null), null));
lt.objs.browser.__BEH__refresh_BANG_ = function(a) {
  return lt.objs.browser.to_frame.call(null, a).reload();
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "refresh!", "lt.objs.browser/refresh!", 1696987659), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__refresh_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840), null], null), null));
lt.objs.browser.__BEH__menu_BANG_ = function(a, b) {
  var c = cljs.core.sort_by.call(null, new cljs.core.Keyword(null, "order", "order", 1119910592), lt.object.raise_reduce.call(null, a, new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), cljs.core.PersistentVector.EMPTY));
  lt.objs.menu.show_menu.call(null, lt.objs.menu.menu.call(null, c));
  lt.util.dom.prevent.call(null, b);
  return lt.util.dom.stop_propagation.call(null, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "menu!", "lt.objs.browser/menu!", 1421234191), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__menu_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), null], null), null));
lt.objs.browser.__BEH__menu_PLUS_ = function(a, b) {
  return cljs.core.conj.call(null, b, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "forward", new cljs.core.Keyword(null, "order", "order", 1119910592), 0, new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "browser.forward", "browser.forward", 4326300017));
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "back", new cljs.core.Keyword(null, "order", "order", 1119910592), 1, new cljs.core.Keyword(null, "click", "click", 1108654330), function(a) {
    return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "browser.back", "browser.back", 2720710495));
  }], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "type", "type", 1017479852), "separator", new cljs.core.Keyword(null, "order", "order", 1119910592), 2], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "copy", new cljs.core.Keyword(null, "order", "order", 1119910592), 3, new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    return lt.objs.browser.to_frame.call(null, a).copy();
  }], null), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "label", "label", 1116631654), "paste", new cljs.core.Keyword(null, "order", "order", 1119910592), 4, new cljs.core.Keyword(null, "click", "click", 1108654330), function(b) {
    return lt.objs.browser.to_frame.call(null, a).paste();
  }], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "menu+", "lt.objs.browser/menu+", 1421234177), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__menu_PLUS_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "menu+", "menu+", 1117686302), null], null), null));
lt.objs.browser.__BEH__init_BANG_ = function(a) {
  var b = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "webview", "webview", 2238328683), lt.object.__GT_content.call(null, a)), c = lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a));
  b.addEventListener("ipc-message", function(b, c) {
    var f = b.args[0], g = cljs.core._EQ_, h = b.channel;
    if (cljs.core.truth_(g.call(null, "browser-event", h))) {
      return lt.object.raise.call(null, a, cljs.core.keyword.call(null, f[0]), f[1]);
    }
    if (cljs.core.truth_(g.call(null, "browser-raise", h))) {
      return lt.object.raise.call(null, lt.object.by_id.call(null, f[0]), cljs.core.keyword.call(null, f[1]), cljs.core.js__GT_clj.call(null, f[2], new cljs.core.Keyword(null, "keywordize-keys", "keywordize-keys", 4191781672), !0));
    }
    throw Error([cljs.core.str("No matching clause: "), cljs.core.str(h)].join(""));
  });
  b.addEventListener("contextmenu", function(b) {
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "menu!", "menu!", 1117686292), b);
  });
  return b.addEventListener("did-finish-load", function() {
    var d = b.getUrl();
    lt.objs.clients.devtools.clear_scripts_BANG_.call(null, (new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)));
    lt.util.dom.val.call(null, c, d);
    return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "navigate", "navigate", 3116398819), d);
  });
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "init!", "lt.objs.browser/init!", 1417774750), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__init_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "init", "init", 1017141378), null], null), null));
lt.objs.browser.__BEH__handle_hash_change = function(a, b) {
  return lt.util.dom.val.call(null, lt.util.dom.$.call(null, new cljs.core.Keyword(null, "input", "input", 1114262332), lt.object.__GT_content.call(null, a)), b.href);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "handle-hash-change", "lt.objs.browser/handle-hash-change", 1421561479), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__handle_hash_change, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "hashchange", "hashchange", 2126071216), null], null), null));
lt.objs.browser.__BEH__set_client_name = function(a, b) {
  var c = lt.objs.browser.to_frame.call(null, a).getTitle(), c = cljs.core.empty_QMARK_.call(null, c) ? "browser" : c;
  lt.object.merge_BANG_.call(null, a, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "name", "name", 1017277949), c], null));
  lt.objs.tabs.refresh_BANG_.call(null, a);
  for (var c = (new cljs.core.Keyword(null, "loading-counter", "loading-counter", 2714046941)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), d = 0;;) {
    if (d < c) {
      lt.objs.notifos.done_working.call(null), d += 1;
    } else {
      break;
    }
  }
  return lt.object.merge_BANG_.call(null, (new cljs.core.Keyword(null, "client", "client", 3951159101)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "name", "name", 1017277949), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "set-client-name", "lt.objs.browser/set-client-name", 1645431759), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__set_client_name, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "navigate", "navigate", 3116398819), null], null), null));
lt.objs.browser.__BEH__update_devtools_client_url = function(a, b) {
  return lt.object.merge_BANG_.call(null, (new cljs.core.Keyword(null, "devtools-client", "devtools-client", 2367412228)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "url", "url", 1014020321), b], null));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "update-devtools-client-url", "lt.objs.browser/update-devtools-client-url", 3723278333), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__update_devtools_client_url, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "navigate", "navigate", 3116398819), null], null), 
null));
lt.objs.browser.__BEH__set_active = function(a) {
  return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "set-active", "lt.objs.browser/set-active", 4650437726), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__set_active, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "active", "active", 3885920888), null, new cljs.core.Keyword(null, "show", "show", 1017433711), 
null], null), null));
lt.objs.browser.__BEH__active_context = function(a) {
  return lt.objs.context.in_BANG_.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698), a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "active-context", "lt.objs.browser/active-context", 1990046533), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__active_context, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "active", "active", 3885920888), null, new cljs.core.Keyword(null, "show", "show", 
1017433711), null], null), null));
lt.objs.browser.__BEH__focus_on_show = function(a) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "focus-on-show", "lt.objs.browser/focus-on-show", 650060667), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__focus_on_show, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "show", "show", 1017433711), null], null), null));
lt.objs.browser.__BEH__inactive_context = function(a) {
  return lt.objs.context.out_BANG_.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "inactive-context", "lt.objs.browser/inactive-context", 1464142818), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__inactive_context, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "inactive", "inactive", 1038569437), null], null), null));
lt.objs.browser.__BEH__handle_send_BANG_ = function(a, b) {
  return lt.object.raise.call(null, a, cljs.core.keyword.call(null, [cljs.core.str((new cljs.core.Keyword(null, "command", "command", 1964298941)).cljs$core$IFn$_invoke$arity$1(b)), cljs.core.str("!")].join("")), b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "handle-send!", "lt.objs.browser/handle-send!", 4165361401), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__handle_send_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "send!", "send!", 1123226891), null], null), null));
lt.objs.browser.__BEH__handle_refresh_BANG_ = function(a) {
  return lt.object.raise.call(null, (new cljs.core.Keyword(null, "frame", "frame", 1111596255)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "handle-refresh!", "lt.objs.browser/handle-refresh!", 2985065480), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__handle_refresh_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "client.refresh!", "client.refresh!", 1210437339), null], null), null));
lt.objs.browser.__BEH__handle_close_BANG_ = function(a) {
  lt.object.raise.call(null, (new cljs.core.Keyword(null, "frame", "frame", 1111596255)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a)), new cljs.core.Keyword(null, "close", "close", 1108660586));
  return lt.objs.clients.rem_BANG_.call(null, a);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "handle-close!", "lt.objs.browser/handle-close!", 2176426435), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__handle_close_BANG_, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "client.close!", "client.close!", 582466590), null], null), null));
lt.objs.browser.__BEH__change_live = function(a, b) {
  var c = lt.objs.clients.cb__GT_obj.call(null, (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b));
  return cljs.core.truth_(c) ? cljs.core.truth_((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b))) ? lt.objs.clients.devtools.changelive_BANG_.call(null, c, (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b)), lt.plugins.watches.watched_range(c, 
  null, null, lt.objs.langs.js.src__GT_watch), function(a) {
    return lt.object.raise.call(null, c, new cljs.core.Keyword(null, "editor.eval.js.change-live.success", "editor.eval.js.change-live.success", 2994410460));
  }, cljs.core.identity) : null : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "change-live", "lt.objs.browser/change-live", 2720093766), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__change_live, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.js.change-live!", "editor.eval.js.change-live!", 3424692446), null], null), null));
lt.objs.browser.__BEH__js_eval_file = function(a, b, c) {
  var d = lt.objs.clients.cb__GT_obj.call(null, (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b));
  return cljs.core.truth_(d) ? (b = (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b), b = cljs.core.assoc.call(null, b, new cljs.core.Keyword(null, "code", "code", 1016963423), [cljs.core.str((new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(b)), cljs.core.str("\n\n//# sourceURL\x3d"), cljs.core.str((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(b))].join("")), lt.objs.clients.devtools.eval_in_webview_client.call(null, 
  lt.objs.browser.client__GT_devtools.call(null, a), b, function(a) {
    cljs.core.truth_(c) && c.call(null);
    return lt.object.raise.call(null, d, new cljs.core.Keyword(null, "editor.eval.js.file.success", "editor.eval.js.file.success", 4272529943));
  })) : null;
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "js-eval-file", "lt.objs.browser/js-eval-file", 817287718), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__js_eval_file, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.js.file!", "editor.eval.js.file!", 1760417539), null], null), null));
lt.objs.browser.__BEH__html_eval = function(a, b) {
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "client.refresh!", "client.refresh!", 1210437339));
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "html-eval", "lt.objs.browser/html-eval", 3721717555), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__html_eval, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.html!", "editor.eval.html!", 3008782487), null], null), null));
lt.objs.browser.__BEH__css_eval = function(a, b) {
  var c = (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b);
  return lt.objs.browser.to_frame.call(null, (new cljs.core.Keyword(null, "frame", "frame", 1111596255)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))).send("editor.eval.css", {code:(new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1(c), name:(new cljs.core.Keyword(null, "name", "name", 1017277949)).cljs$core$IFn$_invoke$arity$1(c)});
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "css-eval", "lt.objs.browser/css-eval", 2220805003), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__css_eval, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.css!", "editor.eval.css!", 3156315329), null], null), null));
lt.objs.browser.__BEH__cljs_exec = function(a, b) {
  var c = lt.objs.browser.to_frame.call(null, (new cljs.core.Keyword(null, "frame", "frame", 1111596255)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, a))), d = (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b);
  return c.send("editor.eval.cljs.exec", {client:(new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b), results:cljs.core.clj__GT_js.call(null, (new cljs.core.Keyword(null, "results", "results", 2111450984)).cljs$core$IFn$_invoke$arity$1(d))});
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "cljs-exec", "lt.objs.browser/cljs-exec", 1664374689), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__cljs_exec, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.cljs.exec!", "editor.eval.cljs.exec!", 743618999), null], null), null));
lt.objs.browser.eval_js_form = function(a, b) {
  var c = cljs.core.assoc.call(null, (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "code", "code", 1016963423), lt.objs.eval.append_source_file.call(null, (new cljs.core.Keyword(null, "code", "code", 1016963423)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b)), (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, 
  "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b)))), d = lt.objs.browser.client__GT_devtools.call(null, a);
  lt.objs.clients.devtools.eval_in_webview_client.call(null, d, c, function(a) {
    a = lt.objs.clients.devtools.inspector__GT_result.call(null, d, a);
    var c = (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b);
    a = cljs.core.assoc.call(null, a, new cljs.core.Keyword(null, "meta", "meta", 1017252215), (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1(c), new cljs.core.Keyword(null, "no-inspect", "no-inspect", 887813498), !0);
    return cljs.core.not.call(null, (new cljs.core.Keyword(null, "ex", "ex", 1013907493)).cljs$core$IFn$_invoke$arity$1(a)) ? lt.objs.browser.handle_cb.call(null, (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "editor.eval.js.result", "editor.eval.js.result", 3021062051), a) : lt.objs.browser.handle_cb.call(null, (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b), new cljs.core.Keyword(null, "editor.eval.js.exception", 
    "editor.eval.js.exception", 723801901), a);
  });
  return lt.object.raise.call(null, a, new cljs.core.Keyword(null, "editor.eval.js.change-live!", "editor.eval.js.change-live!", 3424692446), b);
};
lt.objs.browser.must_eval_file_QMARK_ = function(a, b) {
  return cljs.core.truth_((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b))) ? cljs.core.not.call(null, (new cljs.core.Keyword(null, "meta", "meta", 1017252215)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b))) || cljs.core.not.call(null, lt.objs.clients.devtools.find_script.call(null, a, (new cljs.core.Keyword(null, 
  "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b)))) : null;
};
lt.objs.browser.__BEH__js_eval = function(a, b) {
  var c = lt.objs.browser.client__GT_devtools.call(null, a);
  if (cljs.core.truth_(lt.objs.browser.must_eval_file_QMARK_.call(null, c, b))) {
    c = lt.object.by_id.call(null, (new cljs.core.Keyword(null, "cb", "cb", 1013907409)).cljs$core$IFn$_invoke$arity$1(b));
    if (cljs.core.truth_(c)) {
      var d = (new cljs.core.Keyword(null, "data", "data", 1016980252)).cljs$core$IFn$_invoke$arity$1(b), c = cljs.core.assoc.call(null, d, new cljs.core.Keyword(null, "code", "code", 1016963423), [cljs.core.str(lt.objs.editor.__GT_val.call(null, c)), cljs.core.str("\n\n//# sourceURL\x3d"), cljs.core.str((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1(d))].join(""));
      return lt.objs.clients.devtools.eval_in_webview_client.call(null, lt.objs.browser.client__GT_devtools.call(null, a), c, function(c) {
        return lt.objs.browser.eval_js_form.call(null, a, b);
      });
    }
    return null;
  }
  return lt.objs.browser.eval_js_form.call(null, a, b);
};
lt.object.behavior_STAR_.call(null, new cljs.core.Keyword("lt.objs.browser", "js-eval", "lt.objs.browser/js-eval", 3158449165), new cljs.core.Keyword(null, "reaction", "reaction", 4441361819), lt.objs.browser.__BEH__js_eval, new cljs.core.Keyword(null, "triggers", "triggers", 2516997421), new cljs.core.PersistentHashSet(null, new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "editor.eval.js!", "editor.eval.js!", 1083020921), null], null), null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "browser.url-bar.navigate!", "browser.url-bar.navigate!", 1014303491), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "BrowserUrlBar: navigate to location", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "browser.url-bar", "browser.url-bar", 537128289));
  return cljs.core.truth_(b) ? cljs.core.truth_(cljs.core.deref.call(null, b)) ? lt.object.raise.call(null, b, new cljs.core.Keyword(null, "navigate!", "navigate!", 1766726722), a) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "browser.url-bar.focus", "browser.url-bar.focus", 3353788299), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: focus url", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698));
  return cljs.core.truth_(a) ? cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "url.focus!", "url.focus!", 4046450458)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 4, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "browser.focus-content", "browser.focus-content", 1148241840), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: focus content", new cljs.core.Keyword(null, "hidden", "hidden", 4091384092), !0, new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698));
  return cljs.core.truth_(a) ? cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "browser.back", "browser.back", 2720710495), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: back", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698));
  return cljs.core.truth_(a) ? cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "back!", "back!", 1107397516)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "browser.forward", "browser.forward", 4326300017), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: forward", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "browser", "browser", 1164844698));
  return cljs.core.truth_(a) ? cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "forward!", "forward!", 1497217390)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: add browser tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function(a) {
  var b = lt.objs.browser.add.call(null);
  return cljs.core.not.call(null, a) ? lt.object.raise.call(null, b, new cljs.core.Keyword(null, "focus!", "focus!", 4039653819)) : lt.object.raise.call(null, b, new cljs.core.Keyword(null, "navigate!", "navigate!", 1766726722), a);
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "refresh-connected-browser", "refresh-connected-browser", 3935980900), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Browser: refresh active browser tab", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959));
  return cljs.core.truth_(a) ? cljs.core.truth_(cljs.core.deref.call(null, a)) ? lt.object.raise.call(null, a, new cljs.core.Keyword(null, "refresh!", "refresh!", 4597922840)) : null : null;
}], null));
lt.objs.command.command.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "command", "command", 1964298941), new cljs.core.Keyword(null, "editor.open-current-file-in-browser", "editor.open-current-file-in-browser", 1439718637), new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Editor: Open current file in browser", new cljs.core.Keyword(null, "exec", "exec", 1017031683), function() {
  var a = lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "global.browser", "global.browser", 3786202959)), b = lt.objs.editor.pool.last_active.call(null);
  return cljs.core.truth_(cljs.core.truth_(b) ? (new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))) : b) ? (cljs.core.truth_(a) || lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910)), lt.object.raise.call(null, lt.objs.context.__GT_obj.call(null, new cljs.core.Keyword(null, "global.browser", 
  "global.browser", 3786202959)), new cljs.core.Keyword(null, "navigate!", "navigate!", 1766726722), [cljs.core.str("file://"), cljs.core.str((new cljs.core.Keyword(null, "path", "path", 1017337751)).cljs$core$IFn$_invoke$arity$1((new cljs.core.Keyword(null, "info", "info", 1017141280)).cljs$core$IFn$_invoke$arity$1(cljs.core.deref.call(null, b))))].join(""))) : null;
}], null));
lt.objs.sidebar.clients.add_connector.call(null, new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "name", "name", 1017277949), "Browser", new cljs.core.Keyword(null, "desc", "desc", 1016984067), "Open a browser tab to eval JavaScript, CSS, and HTML live.", new cljs.core.Keyword(null, "connect", "connect", 1965255772), function() {
  return lt.objs.command.exec_BANG_.call(null, new cljs.core.Keyword(null, "add-browser-tab", "add-browser-tab", 3663273910));
}], null));
